r909 - in branches/stable-1.0: . archivers
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat May 5 01:53:04 EDT 2007
Author: icculus
Date: 2007-05-05 01:53:03 -0400 (Sat, 05 May 2007)
New Revision: 909
Modified:
branches/stable-1.0/CHANGELOG
branches/stable-1.0/archivers/zip.c
Log:
Backport from devbranch:
Fixed zip archiver: could do bogus seek if a small, non-zip file got put
through isArchive().
Modified: branches/stable-1.0/CHANGELOG
===================================================================
--- branches/stable-1.0/CHANGELOG 2007-05-05 05:52:43 UTC (rev 908)
+++ branches/stable-1.0/CHANGELOG 2007-05-05 05:53:03 UTC (rev 909)
@@ -4,6 +4,8 @@
-- stuff in the stable-1.0 branch, backported from 2.0.0 dev branch, etc ---
+05052007 - Fixed zip archiver: could do bogus seek if a small, non-zip file
+ got put through isArchive().
04022007 - Fixed Doxygen comment.
03312007 - Moved DIR archiver to start of the list, so we don't have to have
every other archiver fail to open a directory as a file before
Modified: branches/stable-1.0/archivers/zip.c
===================================================================
--- branches/stable-1.0/archivers/zip.c 2007-05-05 05:52:43 UTC (rev 908)
+++ branches/stable-1.0/archivers/zip.c 2007-05-05 05:53:03 UTC (rev 909)
@@ -489,6 +489,8 @@
break;
filepos -= (maxread - 4);
+ if (filepos < 0)
+ filepos = 0;
} /* while */
BAIL_IF_MACRO(!found, ERR_NOT_AN_ARCHIVE, -1);
More information about the physfs-commits
mailing list