blob: bb318721eaf9edca7b88fb08d016c66e5beb52b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$NetBSD: patch-ae,v 1.1 2010/02/16 17:35:34 taca Exp $
deal with CVE-2009-2369.
--- src/common/image.cpp.orig 2006-03-21 23:42:10.000000000 +0000
+++ src/common/image.cpp
@@ -192,6 +192,10 @@ bool wxImage::Create( int width, int hei
m_refData = new wxImageRefData();
+ if (width <= 0 || height <= 0 || width > INT_MAX / 3 / height) {
+ UnRef();
+ return false;
+ }
M_IMGDATA->m_data = (unsigned char *) malloc( width*height*3 );
if (!M_IMGDATA->m_data)
{
|