Skip to content

stb_image: prevent int to overflow before converting it to size_t#1658

Open
illwieckz wants to merge 2 commits intonothings:masterfrom
illwieckz:int-size
Open

stb_image: prevent int to overflow before converting it to size_t#1658
illwieckz wants to merge 2 commits intonothings:masterfrom
illwieckz:int-size

Conversation

@illwieckz
Copy link
Copy Markdown

@illwieckz illwieckz commented Jun 27, 2024

This fixes some warnings in stb_image_write.h reported by CodeQL:

Multiplication result converted to larger type
Multiplication result may overflow 'int' before it is converted to 'size_t'. 

You may find details about the CodeQL reports in the comments made by the github-advanced-security bot in this thread:

@illwieckz illwieckz changed the title stb_image_write: prevent int to overflow before converting it to size_t stb_image: prevent int to overflow before converting it to size_t Jul 10, 2024
@illwieckz
Copy link
Copy Markdown
Author

I added a commit doing the same for stb_image.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants