mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 04:38:04 +02:00
Merge branch 'lzw-compress-1-byte' into 'master'
Fixed crash in _cairo_lzw_compress for 1 byte input See merge request cairo/cairo!376
This commit is contained in:
commit
394256abba
1 changed files with 4 additions and 1 deletions
|
|
@ -369,7 +369,10 @@ _cairo_lzw_compress (unsigned char *data, unsigned long *size_in_out)
|
|||
* lookup. */
|
||||
_lzw_buf_store_bits (&buf, prev, code_bits);
|
||||
|
||||
LZW_SYMBOL_SET_CODE (*slot, code_next++, prev, next);
|
||||
if (likely (slot != NULL))
|
||||
LZW_SYMBOL_SET_CODE (*slot, code_next, prev, next);
|
||||
|
||||
code_next++;
|
||||
|
||||
if (code_next > LZW_BITS_BOUNDARY(code_bits))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue