Skip to content

gate GIF layers math - #1993

Open
HEBEI77 wants to merge 1 commit into
nothings:masterfrom
HEBEI77:gif-layers-gate
Open

HEBEI77 wants to merge 1 commit into
nothings:masterfrom
HEBEI77:gif-layers-gate

Conversation

@HEBEI77

@HEBEI77 HEBEI77 commented Sep 6, 2026

Copy link
Copy Markdown

Title: gate GIF layers math

layers had no overflow check. w and h have one. This adds it.

Adds mul2sizes_valid checks for layersstride, layerssizeof(int),
and layers*g.w before use in stbi__load_gif_main. Returns outofmem
on trip, same path as other OOMs.

Tested with 1/10/100/1000 frame GIFs. All load. Boundary check:
5242874096 passes, 5242884096 trips.

Fixes #1992.

layers had no overflow check. w and h have one. This adds it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GIF: unbounded frame count grows memory with no cap

1 participant