diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2021-11-03 20:47:21 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2021-11-04 10:51:16 +0000 |
commit | 1b8341cb075731cffbf69141c24d8954fef4ee50 (patch) | |
tree | e86994ab72a18088f9d256c4ae96e847c355402f | |
parent | 8a5130c5559989c3b9ea6f74469427abe08c7193 (diff) | |
download | libnsgif-1b8341cb075731cffbf69141c24d8954fef4ee50.tar.gz libnsgif-1b8341cb075731cffbf69141c24d8954fef4ee50.tar.bz2 |
GIF: Remove redundant check and comment from frame initialiser.
-rw-r--r-- | src/libnsgif.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/libnsgif.c b/src/libnsgif.c index 53186d9..80c4530 100644 --- a/src/libnsgif.c +++ b/src/libnsgif.c @@ -993,14 +993,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 */ @@ -1013,12 +1005,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); |