physfs/archivers
Ryan C. Gordon 8f3ab12d22 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:07 +00:00
..
Makefile.am Updated zlib to 1.2.2. 2005-07-13 15:06:21 +00:00
dir.c All memory management now goes through allocation hooks instead of directly to 2005-03-14 11:49:30 +00:00
grp.c All memory management now goes through allocation hooks instead of directly to 2005-03-14 11:49:30 +00:00
hog.c All memory management now goes through allocation hooks instead of directly to 2005-03-14 11:49:30 +00:00
mix.c All memory management now goes through allocation hooks instead of directly to 2005-03-14 11:49:30 +00:00
mvl.c All memory management now goes through allocation hooks instead of directly to 2005-03-14 11:49:30 +00:00
qpak.c All memory management now goes through allocation hooks instead of directly to 2005-03-14 11:49:30 +00:00
wad.c Added translation for WAD file type. 2005-03-16 11:27:31 +00:00
zip.c From: Jorg Walter 2005-07-23 21:46:07 +00:00