Skip to content

Commit

Permalink
Fixed zip archiver: could do bogus seek if a small, non-zip file got put
Browse files Browse the repository at this point in the history
 through isArchive().
  • Loading branch information
icculus committed May 5, 2007
1 parent 35dcb89 commit 05e4432
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Expand Up @@ -2,6 +2,8 @@
* CHANGELOG.
*/

05052007 - Fixed zip archiver: could do bogus seek if a small, non-zip file
got put through isArchive().
04292007 - Minor const correctness tweak in zip archiver.
04032007 - Added a "make dist" target for packing up source code releases.
Reverted Unix recursive mutex code. There were some portability
Expand Down
2 changes: 2 additions & 0 deletions archivers/zip.c
Expand Up @@ -447,6 +447,8 @@ static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
break;

filepos -= (maxread - 4);
if (filepos < 0)
filepos = 0;
} /* while */

BAIL_IF_MACRO(!found, ERR_NOT_AN_ARCHIVE, -1);
Expand Down

0 comments on commit 05e4432

Please sign in to comment.