Browse Source

* loosened check that caused problems if zip had a few bytes appended.

git-svn-id: trunk@43086 -
marco 5 years ago
parent
commit
0a379def88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/paszlib/src/zipper.pp

+ 1 - 1
packages/paszlib/src/zipper.pp

@@ -2312,7 +2312,7 @@ var
           AEndHdr := SwapECD(AEndHdr);
           AEndHdr := SwapECD(AEndHdr);
           {$ENDIF}
           {$ENDIF}
           if (AEndHdr.Signature = END_OF_CENTRAL_DIR_SIGNATURE) and
           if (AEndHdr.Signature = END_OF_CENTRAL_DIR_SIGNATURE) and
-             (I + SizeOf(AEndHdr) + AEndHdr.ZipFile_Comment_Length = BufSize) then
+             (I + SizeOf(AEndHdr) + AEndHdr.ZipFile_Comment_Length <= BufSize) then
           begin
           begin
             AEndHdrPos := FZipStream.Size - BufSize + I;
             AEndHdrPos := FZipStream.Size - BufSize + I;
             FZipStream.Seek(AEndHdrPos + SizeOf(AEndHdr), soBeginning);
             FZipStream.Seek(AEndHdrPos + SizeOf(AEndHdr), soBeginning);