]> git.saurik.com Git - wxWidgets.git/commit - tests/image/image.cpp
Fixed buffer overflow when saving certain images in the Windows icon format.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 23 Mar 2011 15:20:25 +0000 (15:20 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 23 Mar 2011 15:20:25 +0000 (15:20 +0000)
commit2a6545a5a767affb0fb2625ce274758aca179856
treec2ee06be73e5e162b66cbdbdf6b5afa6b5ee6eb6
parentfce2dc61c3fca054138702cad59077d8f7221360
Fixed buffer overflow when saving certain images in the Windows icon format.

When an image did not have a width with a multiple of 4 the calculations for the number of padding bytes (to get a scan line DWORD aligned) would be wrong. This caused a buffer overrun when saving the 1 bits per pixel mask.

Fixes #12937.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/imagbmp.cpp
tests/image/image.cpp