summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2023-01-22 13:38:05 +0000
committerMichael Drake <mdrake.unique@gmail.com>2023-01-22 13:42:47 +0000
commit8062f9197c8b640cbf2e4902479da3eeaa05b688 (patch)
tree53d8374a5d7771a7cfbcab5693ddfd3fd0c69379
parent6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0 (diff)
downloadlibnsgif-8062f9197c8b640cbf2e4902479da3eeaa05b688.tar.gz
gif: Drop arbitrary frame limit
If we're still successfully decoding frames, there's no reason to stop.
-rw-r--r--src/gif.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/gif.c b/src/gif.c
index dafee1a..73814bf 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -1349,13 +1349,6 @@ static nsgif_error nsgif__process_frame(
if (pos < end && pos[0] == NSGIF_TRAILER) {
return NSGIF_OK;
}
-
- /* We could theoretically get some junk data that gives us
- * millions of frames, so we ensure that we don't have a
- * silly number. */
- if (frame_idx > 4096) {
- return NSGIF_ERR_FRAME_COUNT;
- }
}
ret = nsgif__parse_frame_extensions(gif, frame, &pos, !decode);
@@ -2051,7 +2044,6 @@ const char *nsgif_strerror(nsgif_error err)
[NSGIF_ERR_DATA] = "Invalid source data",
[NSGIF_ERR_BAD_FRAME] = "Requested frame does not exist",
[NSGIF_ERR_DATA_FRAME] = "Invalid frame data",
- [NSGIF_ERR_FRAME_COUNT] = "Excessive number of frames",
[NSGIF_ERR_END_OF_DATA] = "Unexpected end of GIF source data",
[NSGIF_ERR_DATA_COMPLETE] = "Can't add data to completed GIF",
[NSGIF_ERR_FRAME_DISPLAY] = "Frame can't be displayed",