039d94f891
* Use textproc/expat to fix CVE-2009-3720. Bump PKGREVISION.
17 lines
487 B
Text
17 lines
487 B
Text
$NetBSD: patch-ca,v 1.2 2010/02/16 17:38:14 taca Exp $
|
|
|
|
deal with CVE-2009-2369.
|
|
|
|
--- src/common/image.cpp.orig 2009-03-06 13:17:40.000000000 +0100
|
|
+++ src/common/image.cpp
|
|
@@ -186,6 +186,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)
|
|
{
|