Skip to content

nsgifload: check dimensions before memory allocation #2168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2021

Conversation

lovell
Copy link
Member

@lovell lovell commented Mar 28, 2021

GIF dimensions are 16-bit unsigned according to https://en.wikipedia.org/wiki/GIF

As images may be truncated, memory is zero initialised.

GIF dimensions are 16-bit unsigned
Initialise memory to zero as image may be truncated
@lovell lovell force-pushed the nsgifload-sanity-check-dimensions branch from 13a19a3 to 744e42e Compare March 28, 2021 18:59
@jcupitt
Copy link
Member

jcupitt commented Mar 28, 2021

Looks good!

@jcupitt jcupitt merged commit 77ccd04 into libvips:master Mar 28, 2021
@lovell lovell deleted the nsgifload-sanity-check-dimensions branch March 29, 2021 06:55
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.

2 participants