Have the GIF decoder check for "not enough data"

Fixes #20
This commit is contained in:
Nigel Tao committed 2019-02-23 14:29:16 +11:00
1 parent 6974c4d629
commit d7f434c6e4
9 files changed
+162 -43

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 B

@@ -0,0 +1,23 @@
# Feed this file to script/make-artificial.go
make gif
header
image {
imageWidthHeight 2 2
palette {
0x00 0x00 0xFF
0x11 0x00 0xFF
0x22 0x00 0xFF
0x33 0x00 0xFF
}
}
frame {
frameLeftTopWidthHeight 0 0 2 2
}
# The frame is 4 pixels, but we only supply 1.
lzw 2 0x00
trailer
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 B

@@ -0,0 +1,23 @@
# Feed this file to script/make-artificial.go
make gif
header
image {
imageWidthHeight 2 2
palette {
0x00 0x00 0xFF
0x11 0x00 0xFF
0x22 0x00 0xFF
0x33 0x00 0xFF
}
}
frame {
frameLeftTopWidthHeight 0 0 2 2
}
# The frame is 4 pixels, but we supply 5.
lzw 2 0x00 0x00 0x00 0x00 0x00
trailer