nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
25.77k stars 7.66k forks source link

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

Open illwieckz opened 1 week ago

illwieckz commented 1 week ago

This fixes some warnings 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: