summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2018-12-04 12:31:37 +1300
committerRobert Ancell <robert.ancell@canonical.com>2019-01-16 15:47:09 +1300
commit06afde5c45b58dd20a366d3dcb85d7e6fd702096 (patch)
tree9ed6e7b6b620d57a3924b0f5f3eac03683eeba63 /tests
parentfb32a04b61029c5e0a151c04095f1608195656c3 (diff)
downloadgdk-pixbuf-06afde5c45b58dd20a366d3dcb85d7e6fd702096.tar.gz
gif: Fix off by one error in LZW decoder
The following was occurring: 1. Code words would be read from the LZW data blocks. 2. If there was exactly enough space for one more codeword in the block, more blocks were read. This is the off by one error. It should have read the last code before doing this. 3. If the next block was the terminating block the code would be marked as complete. 4. Another block would be attempted to be read, because the decoder was still in the same state as step 2. 5. An error was generated because the decoder was trying to read blocks after it had determined the stream had ended. This fixes the GIF decoder failing to decode images without an end-of-information code.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-images/gif-test-suite/TESTS4
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 2dfc87aee..cc986661e 100644
--- a/tests/test-images/gif-test-suite/TESTS
+++ b/tests/test-images/gif-test-suite/TESTS
@@ -31,8 +31,8 @@ missing-pixels
extra-pixels
extra-data
no-clear
-#no-eoi
-#no-clear-and-eoi
+no-eoi
+no-clear-and-eoi
#many-clears
#double-clears
invalid-colors