r908 - in trunk: . archivers

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat May 5 01:52:43 EDT 2007


Author: icculus
Date: 2007-05-05 01:52:43 -0400 (Sat, 05 May 2007)
New Revision: 908

Modified:
   trunk/CHANGELOG.txt
   trunk/archivers/zip.c
Log:
Fixed zip archiver: could do bogus seek if a small, non-zip file got put
 through isArchive().


Modified: trunk/CHANGELOG.txt
===================================================================
--- trunk/CHANGELOG.txt	2007-04-29 08:16:30 UTC (rev 907)
+++ trunk/CHANGELOG.txt	2007-05-05 05:52:43 UTC (rev 908)
@@ -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

Modified: trunk/archivers/zip.c
===================================================================
--- trunk/archivers/zip.c	2007-04-29 08:16:30 UTC (rev 907)
+++ trunk/archivers/zip.c	2007-05-05 05:52:43 UTC (rev 908)
@@ -447,6 +447,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