pkgsrc/x11/wxGTK24/patches/patch-an
2010-02-16 17:33:39 +00:00

17 lines
480 B
Text

$NetBSD: patch-an,v 1.1 2010/02/16 17:33:39 taca Exp $
deal with CVE-2009-2369.
--- src/common/image.cpp.orig 2003-09-21 11:31:39.000000000 +0000
+++ src/common/image.cpp
@@ -147,6 +147,10 @@ void wxImage::Create( int width, int hei
m_refData = new wxImageRefData();
+ if (width <= 0 || height <= 0 || width > INT_MAX / 3 / height) {
+ UnRef();
+ return;
+ }
M_IMGDATA->m_data = (unsigned char *) malloc( width*height*3 );
if (M_IMGDATA->m_data)
{