Skip to content
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

Fix OOB Read when saving GIF of xsize=1 #5149

Merged
merged 2 commits into from Jan 2, 2021

Conversation

wiredfool
Copy link
Member

Triggered in Tests/test_file_gif.py::test_optimize

There is a OOB read of size 1 when the width of the image is 1.

Valgrind output:

Tests/test_file_gif.py::test_optimize **70** 
**70** **********************************************************************
**70** Tests/test_file_gif.py::test_optimize
**70** **********************************************************************
==70== Invalid read of size 1
==70==    at 0x87A7194: ImagingGifEncode (GifEncode.c:237)
==70==    by 0x877D519: _encode (encode.c:141)
==70==    by 0x64BF47: method_vectorcall_VARARGS (descrobject.c:300)

@wiredfool wiredfool marked this pull request as draft December 28, 2020 14:20
@wiredfool wiredfool marked this pull request as ready for review December 30, 2020 16:04
@hugovk hugovk merged commit 07bbc46 into python-pillow:master Jan 2, 2021
@radarhere radarhere changed the title Fix Out of bounds read when saving GIF of xsize=1 Fix OOB read when saving GIF of xsize=1 Jan 2, 2021
@radarhere radarhere changed the title Fix OOB read when saving GIF of xsize=1 Fix OOB Read when saving GIF of xsize=1 Jan 2, 2021
radarhere added a commit to radarhere/Pillow that referenced this pull request Jan 2, 2021
radarhere added a commit that referenced this pull request Jan 2, 2021
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.

None yet

3 participants