@@ -4228,7 +4228,7 @@ def ReadFileHeaderDataWithContent(fp, listonly=False, contentasfile=False, uncom
42284228 except (binascii .Error , json .decoder .JSONDecodeError , UnicodeDecodeError ):
42294229 pass
42304230 fp .seek (len (delimiter ), 1 )
4231- fjend = fp .tell () - 1
4231+ fjend = fp .tell () - len ( delimiter )
42324232 jsonfcs = GetFileChecksum (fprejsoncontent , fjsonchecksumtype , True , formatspecs , saltkey )
42334233 if (not CheckChecksums (fjsonchecksum , jsonfcs ) and not skipchecksum ):
42344234 VerbosePrintOut ("File JSON Data Checksum Error with file " +
@@ -4243,7 +4243,7 @@ def ReadFileHeaderDataWithContent(fp, listonly=False, contentasfile=False, uncom
42434243 fname + " at offset " + str (fheaderstart ))
42444244 VerbosePrintOut ("'" + fcs + "' != " + "'" + newfcs + "'" )
42454245 return False
4246- fhend = fp .tell () - 1
4246+ fhend = fp .tell () - len ( delimiter )
42474247 fcontentstart = fp .tell ()
42484248 fcontents = MkTempFile ()
42494249 pyhascontents = False
@@ -4443,7 +4443,7 @@ def ReadFileHeaderDataWithContentToArray(fp, listonly=False, contentasfile=True,
44434443 except (binascii .Error , json .decoder .JSONDecodeError , UnicodeDecodeError ):
44444444 pass
44454445 fp .seek (len (delimiter ), 1 )
4446- fjend = fp .tell () - 1
4446+ fjend = fp .tell () - len ( delimiter )
44474447 jsonfcs = GetFileChecksum (fprejsoncontent , fjsonchecksumtype , True , formatspecs , saltkey )
44484448 if (not CheckChecksums (fjsonchecksum , jsonfcs ) and not skipchecksum ):
44494449 VerbosePrintOut ("File JSON Data Checksum Error with file " +
@@ -4458,7 +4458,7 @@ def ReadFileHeaderDataWithContentToArray(fp, listonly=False, contentasfile=True,
44584458 fname + " at offset " + str (fheaderstart ))
44594459 VerbosePrintOut ("'" + fcs + "' != " + "'" + newfcs + "'" )
44604460 return False
4461- fhend = fp .tell () - 1
4461+ fhend = fp .tell () - len ( delimiter )
44624462 fcontentstart = fp .tell ()
44634463 fcontents = MkTempFile ()
44644464 pyhascontents = False
@@ -4659,7 +4659,7 @@ def ReadFileHeaderDataWithContentToList(fp, listonly=False, contentasfile=False,
46594659 except (binascii .Error , json .decoder .JSONDecodeError , UnicodeDecodeError ):
46604660 pass
46614661 fp .seek (len (delimiter ), 1 )
4662- fjend = fp .tell () - 1
4662+ fjend = fp .tell () - len ( delimiter )
46634663 jsonfcs = GetFileChecksum (fprejsoncontent , fjsonchecksumtype , True , formatspecs , saltkey )
46644664 if (not CheckChecksums (fjsonchecksum , jsonfcs ) and not skipchecksum ):
46654665 VerbosePrintOut ("File JSON Data Checksum Error with file " +
@@ -4674,7 +4674,7 @@ def ReadFileHeaderDataWithContentToList(fp, listonly=False, contentasfile=False,
46744674 fname + " at offset " + str (fheaderstart ))
46754675 VerbosePrintOut ("'" + fcs + "' != " + "'" + newfcs + "'" )
46764676 return False
4677- fhend = fp .tell () - 1
4677+ fhend = fp .tell () - len ( delimiter )
46784678 fcontentstart = fp .tell ()
46794679 fcontents = MkTempFile ()
46804680 pyhascontents = False
@@ -5001,7 +5001,7 @@ def ReadFileDataWithContentToArray(fp, filestart=0, seekstart=0, seekend=0, list
50015001 return False
50025002 valid_archive = False
50035003 invalid_archive = True
5004- prefhend = fp .tell () - 1
5004+ prefhend = fp .tell () - len ( delimiter )
50055005 prefcontentstart = fp .tell ()
50065006 prefcontents = MkTempFile ()
50075007 pyhascontents = False
@@ -5252,7 +5252,7 @@ def ReadFileDataWithContentToList(fp, filestart=0, seekstart=0, seekend=0, listo
52525252 return False
52535253 valid_archive = False
52545254 invalid_archive = True
5255- prefhend = fp .tell () - 1
5255+ prefhend = fp .tell () - len ( delimiter )
52565256 prefcontentstart = fp .tell ()
52575257 prefcontents = ""
52585258 pyhascontents = False
0 commit comments