From DONOTREPLY at icculus.org Sat May 5 01:52:43 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 5 May 2007 01:52:43 -0400 Subject: r908 - in trunk: . archivers Message-ID: <20070505055243.26466.qmail@icculus.org> 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); From DONOTREPLY at icculus.org Sat May 5 01:53:04 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 5 May 2007 01:53:04 -0400 Subject: r909 - in branches/stable-1.0: . archivers Message-ID: <20070505055304.26679.qmail@icculus.org> 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); From DONOTREPLY at icculus.org Fri May 11 16:12:10 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 11 May 2007 16:12:10 -0400 Subject: r910 - trunk Message-ID: <20070511201210.3244.qmail@icculus.org> Author: icculus Date: 2007-05-11 16:12:10 -0400 (Fri, 11 May 2007) New Revision: 910 Modified: trunk/CHANGELOG.txt trunk/physfs.h Log: Minor documentation fix. Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2007-05-05 05:53:03 UTC (rev 909) +++ trunk/CHANGELOG.txt 2007-05-11 20:12:10 UTC (rev 910) @@ -2,6 +2,7 @@ * CHANGELOG. */ +05112007 - Minor documentation correction. 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. Modified: trunk/physfs.h =================================================================== --- trunk/physfs.h 2007-05-05 05:53:03 UTC (rev 909) +++ trunk/physfs.h 2007-05-11 20:12:10 UTC (rev 910) @@ -498,8 +498,9 @@ * handle a specific failure. * * Once successfully deinitialized, PHYSFS_init() can be called again to - * restart the subsystem. All defaults API states are restored at this - * point. + * restart the subsystem. All default API states are restored at this + * point, with the exception of any custom allocator you might have + * specified, which survives between initializations. * * \return nonzero on success, zero on error. Specifics of the error can be * gleaned from PHYSFS_getLastError(). If failure, state of PhysFS is From DONOTREPLY at icculus.org Sun May 27 10:34:28 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 27 May 2007 10:34:28 -0400 Subject: r911 - trunk/archivers Message-ID: <20070527143428.27231.qmail@icculus.org> Author: icculus Date: 2007-05-27 10:34:28 -0400 (Sun, 27 May 2007) New Revision: 911 Modified: trunk/archivers/lzma.c Log: FIXME removal: Replaced a strncpy() with a memcpy(). Modified: trunk/archivers/lzma.c =================================================================== --- trunk/archivers/lzma.c 2007-05-11 20:12:10 UTC (rev 910) +++ trunk/archivers/lzma.c 2007-05-27 14:34:28 UTC (rev 911) @@ -313,9 +313,8 @@ } /* if */ /* Copy wanted bytes over from cache to outBuffer */ -/* !!! FIXME: strncpy for non-string data? */ - strncpy(outBuffer, - (void*) (entry->archive->folder[entry->folderIndex].cache + + memcpy(outBuffer, + (entry->archive->folder[entry->folderIndex].cache + entry->offset + entry->position), (size_t) wantedSize); entry->position += wantedSize; From DONOTREPLY at icculus.org Sun May 27 10:34:30 2007 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 27 May 2007 10:34:30 -0400 Subject: r912 - trunk Message-ID: <20070527143430.27280.qmail@icculus.org> Author: icculus Date: 2007-05-27 10:34:29 -0400 (Sun, 27 May 2007) New Revision: 912 Modified: trunk/CHANGELOG.txt Log: Updated. Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2007-05-27 14:34:28 UTC (rev 911) +++ trunk/CHANGELOG.txt 2007-05-27 14:34:29 UTC (rev 912) @@ -2,6 +2,7 @@ * CHANGELOG. */ +05272007 - FIXME removal: Replaced a strncpy() with a memcpy(). 05112007 - Minor documentation correction. 05052007 - Fixed zip archiver: could do bogus seek if a small, non-zip file got put through isArchive().