Skip to content

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

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

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

Conversation

@illwieckz

@illwieckz illwieckz commented Jun 27, 2024

Copy link
Copy Markdown

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