forked from AeroNotix/slim-git
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix image handling integer overflows
Image loading memory allocation is based on the image width and height: malloc(heigth * width * 3). Providing an image with large height and width values can cause the result of this calculation to exceed the maximum value of an unsigned int and thus causes an integer overflow. The result: too little memory is allocated and an heap overflow occurs. This patch was based by Niels Heinen <[email protected]> Thanks! Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
- Loading branch information
iwamatsu
committed
Aug 30, 2010
1 parent
8ee8c7b
commit 0e4e4ca
Showing
3 changed files
with
96 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters