diff options
author | DarthSim <darthsim@gmail.com> | 2022-04-15 16:40:41 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-04-15 16:40:41 +0100 |
commit | aa6e2af43ebb898167f6dc0bb8215eacf0a17389 (patch) | |
tree | 3b745812a75c29b297e3a3cca79ec4d245de69e4 | |
parent | 59566cafec6ba3f0eca7718859f2a742469d5b47 (diff) | |
download | libnsgif-aa6e2af43ebb898167f6dc0bb8215eacf0a17389.tar.gz libnsgif-aa6e2af43ebb898167f6dc0bb8215eacf0a17389.tar.bz2 |
GIF: Try to recover after LZW_EOI_CODE.
-rw-r--r-- | src/gif.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -471,7 +471,8 @@ static nsgif_error nsgif__decode_complex( while (available == 0) { if (res != LZW_OK) { /* Unexpected end of frame, try to recover */ - if (res == LZW_OK_EOD) { + if (res == LZW_OK_EOD || + res == LZW_EOI_CODE) { ret = NSGIF_OK; } else { ret = nsgif__error_from_lzw(res); @@ -557,7 +558,7 @@ static nsgif_error nsgif__decode_simple( frame_data += written; if (res != LZW_OK) { /* Unexpected end of frame, try to recover */ - if (res == LZW_OK_EOD) { + if (res == LZW_OK_EOD || res == LZW_EOI_CODE) { ret = NSGIF_OK; } else { ret = nsgif__error_from_lzw(res); |