From 0e2eaa923ddea285dfa35c4bf0c0092d3799e2ee Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 1 Jun 2026 22:14:57 -0700
Subject: [PATCH] Seek past ANI chunks that we don't handle
---
src/IMG_ani.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/IMG_ani.c b/src/IMG_ani.c
index bc705a43..d74afb8e 100644
--- a/src/IMG_ani.c
+++ b/src/IMG_ani.c
@@ -328,6 +328,9 @@ static bool ParseList(IMG_AnimationParseContext *parse, Uint32 size)
return ParseFrameList(parse, size);
} else {
// Unknown list chunk, ignore it
+ if (SDL_SeekIO(src, size, SDL_IO_SEEK_CUR) < 0) {
+ return false;
+ }
return true;
}
}
@@ -344,6 +347,9 @@ static bool ParseSequenceChunk(IMG_AnimationParseContext *parse, Uint32 size)
if (!(anih->fl & ANI_FLAG_SEQUENCE)) {
// The header says we don't use sequence data, ignore it
+ if (SDL_SeekIO(src, size, SDL_IO_SEEK_CUR) < 0) {
+ return false;
+ }
return true;
}