Re: [AD] bug with Allegro packfile compression |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2006-09-01, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> 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?
Right, not a great test case. It was mainly to check I didn't break
anything else. Actually, a real random stream would be the worst
possible case for _compression_. Oops :-)
>
> Is there a specific byte sequence that causes it to fail?
You'd need to find a compressed sequence such that while processing the
last "flags" byte in the file (see packfile._tx) we cross the boundary
of the internal read-ahead buffer (of 4096 bytes). The test case is
already in the a.cc thread so would it be worth coming up with another?
Peter