summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2021-11-03 20:47:21 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2021-11-03 20:48:55 +0000
commitf2c94c53e1a05e11bd5efda79748f847f24c7f7d (patch)
tree363df37eba3fc88c2670c9d89225b3b9a108c3bb
parentf19df341f8a3f3ec5a319fd4621b4a8f53699dcb (diff)
downloadlibnsgif-f2c94c53e1a05e11bd5efda79748f847f24c7f7d.tar.gz
libnsgif-f2c94c53e1a05e11bd5efda79748f847f24c7f7d.tar.bz2
GIF: Remove redundant check and comment from frame initialiser.
-rw-r--r--src/libnsgif.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/libnsgif.c b/src/libnsgif.c
index 366b4ef..1280798 100644
--- a/src/libnsgif.c
+++ b/src/libnsgif.c
@@ -991,14 +991,6 @@ static gif_result gif_initialise_frame(
return GIF_OK;
}
- /* Check if there is enough data remaining. The shortest block of data
- * is a 4-byte comment extension + 1-byte block terminator + 1-byte gif
- * trailer
- */
- if (gif_bytes < 6) {
- return GIF_INSUFFICIENT_DATA;
- }
-
/* We could theoretically get some junk data that gives us millions of
* frames, so we ensure that we don't have a silly number
*/
@@ -1011,12 +1003,6 @@ static gif_result gif_initialise_frame(
return GIF_INSUFFICIENT_MEMORY;
}
- /* We pretend to initialise the frames, but really we just skip over
- * all the data contained within. This is all basically a cut down
- * version of gif_decode_frame that doesn't have any of the LZW bits in
- * it.
- */
-
/* Initialise any extensions */
gif->buffer_position = gif_data - gif->gif_data;
ret = gif__parse_frame_extensions(gif, &gif->frames[frame_idx], true);