bugfix for PFS0EncryptedProvider

This commit is contained in:
Dmitry Isaenko 2019-09-27 05:08:10 +03:00
parent a69adf863e
commit db80c89639
2 changed files with 6 additions and 5 deletions

View file

@ -201,6 +201,8 @@ public class PFS0EncryptedProvider implements IPFS0Provider{
// If we have extra-small file that is less then a block and even more // If we have extra-small file that is less then a block and even more
if ((0x200 - skipBytes) > pfs0subFiles[subFileNumber].getSize()){ if ((0x200 - skipBytes) > pfs0subFiles[subFileNumber].getSize()){
streamOut.write(dectyptedBlock, skipBytes, (int) pfs0subFiles[subFileNumber].getSize()); // safe cast streamOut.write(dectyptedBlock, skipBytes, (int) pfs0subFiles[subFileNumber].getSize()); // safe cast
bis.close();
streamOut.close();
return; return;
} }
else else
@ -212,7 +214,6 @@ public class PFS0EncryptedProvider implements IPFS0Provider{
} }
startBlock++; startBlock++;
} }
long endBlock = pfs0subFiles[subFileNumber].getSize() / 0x200 + startBlock; // <- pointing to place where any data related to this media-block ends long endBlock = pfs0subFiles[subFileNumber].getSize() / 0x200 + startBlock; // <- pointing to place where any data related to this media-block ends
//----------------------------- Step 2: Detect if we have junk data on the end of the final block -------------------------------- //----------------------------- Step 2: Detect if we have junk data on the end of the final block --------------------------------

View file

@ -49,7 +49,7 @@
</Label> </Label>
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane styleClass="customGrid" GridPane.columnIndex="1"> <AnchorPane styleClass="customTitleGrid" GridPane.columnIndex="1">
<children> <children>
<Label text="Size" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <Label text="Size" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<font> <font>
@ -61,7 +61,7 @@
</Label> </Label>
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane styleClass="customGrid" GridPane.columnIndex="2"> <AnchorPane styleClass="customTitleGrid" GridPane.columnIndex="2">
<children> <children>
<Label text="Description" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <Label text="Description" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<font> <font>
@ -73,7 +73,7 @@
</Label> </Label>
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane styleClass="customGrid" GridPane.columnIndex="3"> <AnchorPane styleClass="customTitleGrid" GridPane.columnIndex="3">
<children> <children>
<Label text="Value" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <Label text="Value" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<font> <font>
@ -85,7 +85,7 @@
</Label> </Label>
</children> </children>
</AnchorPane> </AnchorPane>
<AnchorPane styleClass="customGrid"> <AnchorPane styleClass="customTitleGrid">
<children> <children>
<Label text="Offset" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <Label text="Offset" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<font> <font>