diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-10-15 19:00:57 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2016-10-15 19:00:57 +0200 |
commit | 939d49a3a9d1cbcd2a37cea9eac9f9e5e9f9de78 (patch) | |
tree | 3d11aeef4aaf36afc5a2229f704081bd0cb840ab /configure.ac | |
parent | 53110871935244816bbb9d131da0bccff734bfe9 (diff) | |
download | libgd-939d49a3a9d1cbcd2a37cea9eac9f9e5e9f9de78.tar.gz |
Fix #68: gif: buffer underflow reported by AddressSanitizer
The buffer underflow happens at the start of the bitstream and after
each clear code, where the wrap-around is actually unnecessary. To
avoid the buffer underflow we simply initialize scd->last_byte to 2,
instead of adding further control logic to skip the relevant
assignments altogether.
We do not add a regression test, because the buffer underflow could
only be detected with ASAN or a similar memory-checker (or debugging),
and it happens for all proper GIFs anyway, so other tests (such as
tests/gif/gif_im2im) already exhibited the behavior.
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions