|
|
Before I dig deeper into the code (this decoding algorithm looks pretty complicated), can you explain in a few more words why your fix is the correct one
I can understand you are concerned about side effects of this change - this decrementing of FreeCount is 20 year old code (I've followed it back to a commit for FLTK 1.1!).
Nevertheless I'm quite certain that it is plainly wrong, as explained already.
I have now looked into several implementations that claim to be gif2ras descendants (like FL_GIF_Image). None of them has that decrement of FreeCount, although the rest of the code is still similar.
I think it maybe intended to secure the code from buffer overflows and did not realize it could change the dictionary table.
IMHO the code with this fix is completely in the intention of the specification: Act like the table were as big as FreeCode, but do not store new values in the table.
how we can verify that it doesn't break other cases (w/o just testing lots of images)?
I fear apart from accurate code review from several people there is no other way than testing various images, like here:
https://github.com/robert-ancell/pygif/tree/master/test-suite
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
[ Direct Link to Message ] | |
|
| |