Re: [AD] bug with Allegro packfile compression

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I wonder how long that's been there. One thing, you said
"(1) the bug doesn't show up with a random file of the same length as test.tst;"
but you're testing it with /dev/urandom?

Is there a specific byte sequence that causes it to fail?

Pete

On 9/1/06, Peter Wang <tjaden@xxxxxxxxxx> wrote:
The bug was introduced here: http://www.allegro.cc/forums/thread/587170

I think I have a fix.  I would appreciate help looking it over (see the
comments for detailed explanation of the problem) and stress testing it,
since Evert is planning to release 4.2.1 this weekend.  In addition to
the test case in the thread, I've attached a shell script which produces
files using /dev/zero and /dev/urandom, compresses and decompresses them
with the `pack' tool and checks they are the same.

I've tried to minimise the number of changes and maintaining PACKFILE
semantics, in particular that pack_feof() returns TRUE immediately after
the last byte has been read (unlike feof() which returns true once you
try to read _past_ the last byte).

Peter


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--
https://lists.sourceforge.net/lists/listinfo/alleg-developers







Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/