Skip to content

fix: added bounds check in gif decoder - #6863

Merged
kisvegabor merged 7 commits into
lvgl:masterfrom
Alpeev:master
Sep 26, 2024
Merged

kisvegabor merged 7 commits into
lvgl:masterfrom
Alpeev:master

Conversation

@Alpeev

@Alpeev Alpeev commented Sep 16, 2024 •

Copy link
Copy Markdown
Contributor

Added bound check in the gif header parsing functions to avoid integer overflow with subsequent allocation of wrongly-sized-buffer;
Also, added checks to avoid buffer overruns in the image parsing functions.

@Alpeev Alpeev changed the title added bounds check in gif decoder fix: added bounds check in gif decoder Sep 16, 2024

@kisvegabor kisvegabor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wao, thank you! To be honest, we haven't focused on these kind of issues so far. It's great that now you made the first step! 🚀

Comment thread src/libs/gif/gifdec.c Resolved
Co-authored-by: Gabor Kiss-Vamosi <[email protected]>
@Alpeev

Alpeev commented Sep 17, 2024

Copy link
Copy Markdown
Contributor Author

Thanks!

@Alpeev

Alpeev commented Sep 17, 2024

Copy link
Copy Markdown
Contributor Author

Are there any target archs with 16 bit ints?

@Alpeev

Alpeev commented Sep 17, 2024

Copy link
Copy Markdown
Contributor Author

Modified so as to avoid problems in arches with 16 bit ints.
In the long run though, it is a good idea to change all counter varibles either to size_t or fixed-size integers.

@kisvegabor

Copy link
Copy Markdown
Member

In the long run though, it is a good idea to change all counter varibles either to size_t or fixed-size integers.

In LVGL we are doing that, however we integrate 3rd party libraries with as minimal modifications as possible.

@kisvegabor
kisvegabor merged commit 610224e into lvgl:master Sep 26, 2024
kisvegabor added a commit to kisvegabor/lvgl_fork that referenced this pull request Sep 26, 2024
kisvegabor added a commit to kisvegabor/lvgl_fork that referenced this pull request Oct 1, 2024
kisvegabor added a commit that referenced this pull request Oct 9, 2024
rodb70 pushed a commit to rodb70/lvgl that referenced this pull request Nov 8, 2024
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.

3 participants