diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2018-12-04 16:51:36 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2019-01-16 15:47:09 +1300 |
commit | b9b12bfd5c6f8394cc9a4a548bd6dc0f5fb2f70b (patch) | |
tree | dfd082ef8439c313cf44dacaa5d740f150534b61 /tests | |
parent | 06afde5c45b58dd20a366d3dcb85d7e6fd702096 (diff) | |
download | gdk-pixbuf-b9b12bfd5c6f8394cc9a4a548bd6dc0f5fb2f70b.tar.gz |
gif: Fix multiple LZW clear codes breaking decoding
The following was occurring:
1. A clear code is detected in the LZW stream
2. The first code is detected as a clear.
3. The following code is returned as a color index, this breaks if it is a
clear.
There were two codepaths in use, one for handling the first clear in the LZW
sequence and another for handling clears within the sequence. The former
handled sequential clears correctly, the latter did not.
The solution is to the correct codepath and remove the other one. This
simplification should not affect other decoding (as confirmed by the test
suite).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-images/gif-test-suite/TESTS | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-images/gif-test-suite/TESTS b/tests/test-images/gif-test-suite/TESTS index cc986661e..1d4a3f13f 100644 --- a/tests/test-images/gif-test-suite/TESTS +++ b/tests/test-images/gif-test-suite/TESTS @@ -33,8 +33,8 @@ extra-data no-clear no-eoi no-clear-and-eoi -#many-clears -#double-clears +many-clears +double-clears invalid-colors max-width max-height |