[arch-commits] Commit in wxgtk/repos (4 files)

Eric Bélanger eric at archlinux.org
Sat Jul 11 23:04:17 UTC 2009


    Date: Saturday, July 11, 2009 @ 19:04:17
  Author: eric
Revision: 45460

Merged revisions 45453,45457 via svnmerge from 
svn+ssh://svn.archlinux.org/srv/svn-packages/wxgtk/trunk

........
  r45453 | eric | 2009-07-11 16:44:25 -0400 (Sat, 11 Jul 2009) | 2 lines
  
  upgpkg: wxgtk 2.8.10.1-3
      Added security fix (close FS#15469)
........
  r45457 | eric | 2009-07-11 17:52:31 -0400 (Sat, 11 Jul 2009) | 1 line
  
  upgpkg: wxgtk 2.8.10.1-4
........

Added:
  wxgtk/repos/testing-i686/overflow.patch
    (from rev 45457, wxgtk/trunk/overflow.patch)
Modified:
  wxgtk/repos/testing-i686/	(properties)
  wxgtk/repos/testing-i686/ChangeLog
  wxgtk/repos/testing-i686/PKGBUILD

----------------+
 ChangeLog      |    5 ++++
 PKGBUILD       |   11 +++++----
 overflow.patch |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 5 deletions(-)


Property changes on: wxgtk/repos/testing-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /wxgtk/trunk:1-43929
   + /wxgtk/trunk:1-45459

Modified: testing-i686/ChangeLog
===================================================================
--- testing-i686/ChangeLog	2009-07-11 22:16:16 UTC (rev 45459)
+++ testing-i686/ChangeLog	2009-07-11 23:04:17 UTC (rev 45460)
@@ -1,3 +1,8 @@
+2009-07-11  Eric Belanger  <eric at archlinux.org>
+
+	* wxgtk 2.8.10.1-4
+	* Added security fix (close FS#15469)
+
 2009-05-21  Eric Belanger  <eric at archlinux.org>
 
 	* wxgtk 2.8.10.1-1

Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2009-07-11 22:16:16 UTC (rev 45459)
+++ testing-i686/PKGBUILD	2009-07-11 23:04:17 UTC (rev 45460)
@@ -6,21 +6,22 @@
 
 pkgname=wxgtk
 pkgver=2.8.10.1
-pkgrel=2
+pkgrel=4
 pkgdesc="wxGTK - GTK+ implementation of wxWidgets API for GUI"
 arch=('i686' 'x86_64')
 url="http://wxwidgets.org"
 license=('custom:wxWindows')
-depends=('gtk2>=2.16.2-2' 'mesa')
+depends=('gtk2>=2.16.2' 'mesa')
 makedepends=('libgnomeprintui')
 #source=(http://downloads.sourceforge.net/wxwindows/wxGTK-${pkgver}.tar.bz2)
-source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2)
-md5sums=('65d5ef166f23fe8b4c67f58df164f93e')
-sha1sums=('6598fbafd979a91f20100171fa23a91779f6dc62')
+source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2 overflow.patch)
+md5sums=('65d5ef166f23fe8b4c67f58df164f93e' '325dba65152bc0cfbc1400a2bf54508e')
+sha1sums=('6598fbafd979a91f20100171fa23a91779f6dc62' '7c4d1d507aad0b7c25a0de55234be42ea3e3f55f')
 
 build() {
   cd "${srcdir}/wxPython-src-${pkgver}"
 #  cd "${srcdir}/wxGTK-${pkgver}"
+  patch -p4 < ../overflow.patch || return 1
   ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
 	  --enable-graphics_ctx --with-gnomeprint --disable-optimize || return 1
   make || return 1

Copied: wxgtk/repos/testing-i686/overflow.patch (from rev 45457, wxgtk/trunk/overflow.patch)
===================================================================
--- testing-i686/overflow.patch	                        (rev 0)
+++ testing-i686/overflow.patch	2009-07-11 23:04:17 UTC (rev 45460)
@@ -0,0 +1,66 @@
+Index: /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagpng.cpp
+===================================================================
+--- /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagpng.cpp (revision 53479)
++++ /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagpng.cpp (revision 60875)
+@@ -569,5 +569,7 @@
+         goto error;
+ 
+-    lines = (unsigned char **)malloc( (size_t)(height * sizeof(unsigned char *)) );
++    // initialize all line pointers to NULL to ensure that they can be safely
++    // free()d if an error occurs before all of them could be allocated
++    lines = (unsigned char **)calloc(height, sizeof(unsigned char *));
+     if ( !lines )
+         goto error;
+@@ -576,9 +578,5 @@
+     {
+         if ((lines[i] = (unsigned char *)malloc( (size_t)(width * (sizeof(unsigned char) * 4)))) == NULL)
+-        {
+-            for ( unsigned int n = 0; n < i; n++ )
+-                free( lines[n] );
+             goto error;
+-        }
+     }
+ 
+Index: /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagtiff.cpp
+===================================================================
+--- /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagtiff.cpp (revision 48694)
++++ /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagtiff.cpp (revision 60876)
+@@ -262,5 +262,4 @@
+ 
+     uint32 w, h;
+-    uint32 npixels;
+     uint32 *raster;
+ 
+@@ -276,7 +275,18 @@
+                             samplesInfo[0] == EXTRASAMPLE_UNASSALPHA));
+ 
+-    npixels = w * h;
+-
+-    raster = (uint32*) _TIFFmalloc( npixels * sizeof(uint32) );
++    // guard against integer overflow during multiplication which could result
++    // in allocating a too small buffer and then overflowing it
++    const double bytesNeeded = w * h * sizeof(uint32);
++    if ( bytesNeeded >= 4294967295U /* UINT32_MAX */ )
++    {
++        if ( verbose )
++            wxLogError( _("TIFF: Image size is abnormally big.") );
++
++        TIFFClose(tif);
++
++        return false;
++    }
++
++    raster = (uint32*) _TIFFmalloc( bytesNeeded );
+ 
+     if (!raster)
+Index: /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagtiff.cpp
+===================================================================
+--- /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagtiff.cpp (revision 60876)
++++ /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagtiff.cpp (revision 60897)
+@@ -277,5 +277,5 @@
+     // guard against integer overflow during multiplication which could result
+     // in allocating a too small buffer and then overflowing it
+-    const double bytesNeeded = w * h * sizeof(uint32);
++    const double bytesNeeded = (double)w * (double)h * sizeof(uint32);
+     if ( bytesNeeded >= 4294967295U /* UINT32_MAX */ )
+     {




More information about the arch-commits mailing list