Commit Graph

70 Commits

Author SHA1 Message Date
Ryan C. Gordon 08a15ea0c6 Backport from dev branch: infinite loop in zip_expand_symlink_path(). 2011-06-01 03:16:15 -04:00
Ryan C. Gordon 205a7d3e63 Backported zip/qpak dir fix from dev branch to stable-1.0. 2011-02-18 12:44:30 -05:00
Ryan C. Gordon 32fb2ab4a9 Various archiver swap and compare functions now check if they are
swapping/comparing an item against itself, for efficiency and to prevent
 overlapping memcpy() calls.
2008-02-20 12:24:10 +00:00
Ryan C. Gordon fc6d85b2f4 Backport from devbranch:
Fixed zip archiver: could do bogus seek if a small, non-zip file got put
 through isArchive().
2007-05-05 05:53:03 +00:00
Ryan C. Gordon c08f79715b Changed my email address. 2006-01-01 12:31:34 +00:00
Ryan C. Gordon 1affc74230 From: Jorg Walter
To: icculus@clutteredmind.org
Subject: Bug in zip archiver
Date: Sat, 23 Jul 2005 22:19:09 +0200

Hi!

PhysFS has a bug in the ZIP archive module, function zip_find_start_of_dir.
Upon encountering a substring match, rc is set to a wrong value. The fix is
simple: swap both assignments like this:

[patch below  --Ed.]

Some additional info for testing: Symptoms when you encounter this bug: A dir
is reported as empty although it has files in it; prerequisites or
encountering it: two dirs, one a substring of another, like "data/txt" and
"data/txt2", laid out in a way so that variable "middle" points to a file in
txt2 at some point during zip_find_start_of_dir

By the way, if you're interested in where PhysFS is used: I found this bug
while writing a patch for DOSBox (http://dosbox.sourceforge.net) to support
ZIP files. And I'd love to see that enhanced PHYSFS_mount syntax in an
official release soon *hint* ;);)
2005-07-23 21:46:46 +00:00
Ryan C. Gordon f3191d0e85 Off-by-one fix by Dieter Baron...fixes segfault in zip archive searching in
certain cases.
2003-07-20 21:13:25 +00:00
Ryan C. Gordon f4309f51e8 Tabs-to-spaces patch by James Turk. 2003-07-20 21:08:24 +00:00
Ryan C. Gordon b50342ad13 PocketPC fixes (thanks, David Hedbor!) 2003-05-18 07:52:28 +00:00
Ryan C. Gordon 1344feceda Fixed seeking in uncompressed zip entries and handle Java-created JAR files.
(Thanks to "Tree" for pointing out these bugs).
2003-03-30 18:44:59 +00:00
Ryan C. Gordon 6f1d693fe8 Another attempt at type size correctness. 2003-03-12 06:19:37 +00:00
Ryan C. Gordon 01505d8d58 Attempt at type correctness. 2003-03-12 05:39:51 +00:00
Ryan C. Gordon 3a479b6cd8 Now compiles on CodeWarrior 6 for MacOS Classic again. 2003-01-31 04:07:48 +00:00
Ryan C. Gordon 9d82110b57 Some cleanups for PocketPC port. 2002-11-22 06:24:10 +00:00
Ryan C. Gordon 7606e3bf11 Win32 fixes. 2002-09-23 18:35:12 +00:00
Ryan C. Gordon ee077eabec Fixed infinite loop bug, cleaned out tab chars. 2002-08-30 14:30:49 +00:00
Ryan C. Gordon f5e279536c Fixed bug that prevented use when symlinks were disallowed.
More optimizations, too.
2002-08-28 23:32:29 +00:00
Ryan C. Gordon 680de768b7 Fixes. 2002-08-28 08:27:27 +00:00
Ryan C. Gordon c5dfea18cf ZIP_exists() now works with directories. 2002-08-21 22:33:30 +00:00
Ryan C. Gordon d40d951594 Minor signed/unsigned fix...ZIP_isDirectory() now seems to work. 2002-08-21 04:13:56 +00:00
Ryan C. Gordon 1f5b571be7 Bunch of tedious corrections, optimizations, and cleanups. 2002-08-21 02:59:15 +00:00
Ryan C. Gordon 1e2372b44c Generalized sorting routines, and removed individual implementations. 2002-08-20 01:34:27 +00:00
Ryan C. Gordon 912ca3266d Fix for correct cleanup on read error. 2002-07-31 04:18:58 +00:00
Ryan C. Gordon d701627335 Patched memory leaks (thanks, Valgrind!) 2002-07-29 06:18:58 +00:00
Ryan C. Gordon 42be0046aa Natural language #defines and build system support. 2002-07-28 21:03:27 +00:00
Ryan C. Gordon 0ab061308d Initialized some variables to stop compiler whining. 2002-07-27 22:06:25 +00:00
Ryan C. Gordon 1b29c3888c More enumerate fixes. 2002-07-26 17:03:26 +00:00
Ryan C. Gordon 3ae1f1fa80 Changed DirFunctions struct a little. 2002-07-26 06:19:09 +00:00
Ryan C. Gordon 8eeaf6c6d7 Rewrote ZIP_enumerateFiles() again. Hopefully it sucks less this time. 2002-07-25 04:41:43 +00:00
Ryan C. Gordon 7c80bcf537 Disabled shitty enumeration code. Will fix soon. 2002-07-23 22:55:47 +00:00
Ryan C. Gordon a4d07b8e10 More enumeration fixes. I still hate this code. 2002-07-23 22:09:35 +00:00
Ryan C. Gordon 55b7638892 Fixed a double-free. 2002-07-23 21:26:51 +00:00
Ryan C. Gordon e460c9ce9a Fixed ZIP_isArchive() to report correctly if it has to check for the
end of central directory record.
2002-07-23 18:05:50 +00:00
Ryan C. Gordon 4765a364fe Fixed enumerations that end with '/'. 2002-07-23 17:52:56 +00:00
Ryan C. Gordon e98615a7ca My rewrite continues. I'm mostly satisfied with this code now, minus debugging. 2002-07-23 07:49:13 +00:00
Ryan C. Gordon f558dcfe4a Seeking backwards in ZIP_seek() works now. 2002-07-17 16:05:39 +00:00
Ryan C. Gordon 2fab3d9da4 Fixed symlink detection. 2002-07-15 13:20:34 +00:00
Ryan C. Gordon 2ec465ffc4 Symlink fixes. Still broken, though. 2002-07-15 02:22:52 +00:00
Ryan C. Gordon 480a259452 ZIP archiver rewrite. 2002-07-13 10:17:13 +00:00
Ryan C. Gordon 959a15e27f FIXME cleanups. 2002-07-11 21:37:30 +00:00
Ryan C. Gordon 05b565422a Implemeted getLastModTime method. 2002-06-06 05:38:47 +00:00
Ryan C. Gordon 5386a5c6a2 Added PHYSFS_getLastModTime() API. (Thanks, John Hall!) 2002-05-25 09:41:14 +00:00
Ryan C. Gordon a2bec46a6b Initial autoconf support. 2002-05-10 09:25:25 +00:00
Ryan C. Gordon 748cbac1c0 Patches for correctness and cleaner win32 support. 2002-04-12 05:53:12 +00:00
Ryan C. Gordon a366cfe1a2 Approved zeph's comments, fixed a few of my screwups. 2002-04-03 07:40:27 +00:00
Gregory S. Read 0217b7cdd7 -Added type casting that Ryan needs to approve.
-MSVC complained about implicit 64-bit to 32-bit conversions.
2002-04-03 04:20:07 +00:00
Ryan C. Gordon 9982d89b5b Removed now-unnecessary errno.h include. 2002-04-01 18:45:37 +00:00
Ryan C. Gordon 5d2b8493f6 Patched to compile. 2002-03-30 01:57:53 +00:00
Ryan C. Gordon d8cf534bf2 Platform abstracted i/o, other bugfixes. 2002-03-29 08:20:06 +00:00
Ryan C. Gordon f2887cf047 Added typedefs and platform-specific i/o. 2002-03-24 19:47:33 +00:00