[gnome-xcf-thumbnailer/f12/master] - Fix RHBZ #64797 (CVE-2009-2175) - Update GConf scriptlets to latest specifications

Mohamed ElMorabity melmorabity at fedoraproject.org
Sat Oct 30 18:15:45 UTC 2010


commit 43ca50244af7ef979050d081e6a7f3bdbecd98cf
Author: rpmbuild <rpmbuild at localhost.localdomain>
Date:   Sat Oct 30 20:14:20 2010 +0200

    - Fix RHBZ #64797 (CVE-2009-2175)
    - Update GConf scriptlets to latest specifications

 .gitignore                                    |    1 +
 gnome-xcf-thumbnailer-1.0-CVE-2009-2175.patch |   45 +++++++++++++++++++++++++
 gnome-xcf-thumbnailer.spec                    |   28 ++++++---------
 3 files changed, 57 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ae7178a..40bd276 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 gnome-xcf-thumbnailer-1.0.tar.bz2
+/gnome-xcf-thumbnailer-1.0.tar.bz2
diff --git a/gnome-xcf-thumbnailer-1.0-CVE-2009-2175.patch b/gnome-xcf-thumbnailer-1.0-CVE-2009-2175.patch
new file mode 100644
index 0000000..c06816e
--- /dev/null
+++ b/gnome-xcf-thumbnailer-1.0-CVE-2009-2175.patch
@@ -0,0 +1,45 @@
+Index: flatten.c
+===================================================================
+RCS file: /home/makcvs/repository/source/xcftools/flatten.c,v
+retrieving revision 1.27
+diff -u -r1.27 flatten.c
+--- flatten.c	22 Feb 2006 00:01:04 -0000	1.27
++++ flatten.c	18 Jun 2009 23:11:42 -0000
+@@ -619,14 +619,14 @@
+   fillTile(&toptile,0);
+ 
+   for( where.t = spec->dim.c.t; where.t < spec->dim.c.b; where.t=where.b ) {
+-    where.b = (where.t+TILE_HEIGHT) - where.t % TILE_HEIGHT ;
++    where.b = TILE_TOP(where.t)+TILE_HEIGHT ;
+     if( where.b > spec->dim.c.b ) where.b = spec->dim.c.b ;
+     nrows = where.b - where.t ;
+     for( y = 0; y < nrows ; y++ )
+       rows[y] = xcfmalloc(4*(spec->dim.c.r-spec->dim.c.l));
+ 
+     for( where.l = spec->dim.c.l; where.l < spec->dim.c.r; where.l=where.r ) {
+-      where.r = (where.l+TILE_WIDTH) - where.l % TILE_WIDTH ;
++      where.r = TILE_LEFT(where.l)+TILE_WIDTH ;
+       if( where.r > spec->dim.c.r ) where.r = spec->dim.c.r ;
+       ncols = where.r - where.l ;
+ 
+Index: xcftools.h
+===================================================================
+RCS file: /home/makcvs/repository/source/xcftools/xcftools.h,v
+retrieving revision 1.17
+diff -u -r1.17 xcftools.h
+--- xcftools.h	13 Feb 2006 03:04:03 -0000	1.17
++++ xcftools.h	18 Jun 2009 23:11:42 -0000
+@@ -146,6 +146,13 @@
+ /* These are hardcoded in the Gimp sources: */
+ #define TILE_WIDTH 64
+ #define TILE_HEIGHT 64
++/* These definitions of TILE_LEFT and TILE_TOP work correctly for negative
++ * numbers, but on the other hand depend on TILE_WIDTH and TILE_HEIGHT
++ * being powers of 2. That's okay, because the tile size cannot change
++ * anyway.
++ */
++#define TILE_LEFT(x) ((x) & -TILE_WIDTH)
++#define TILE_TOP(y) ((y) & -TILE_HEIGHT)
+ 
+ struct tileDimensions {
+   struct rect c ;
diff --git a/gnome-xcf-thumbnailer.spec b/gnome-xcf-thumbnailer.spec
index 7907ad1..94148aa 100644
--- a/gnome-xcf-thumbnailer.spec
+++ b/gnome-xcf-thumbnailer.spec
@@ -1,12 +1,14 @@
 Name:           gnome-xcf-thumbnailer
 Version:        1.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Thumbnailer for XCF files
 
 Group:          Amusements/Graphics
 License:        GPLv2+
 URL:            http://ftp.gnome.org/pub/GNOME/sources/gnome-xcf-thumbnailer/
 Source0:        http://download.gnome.org/sources/%{name}/%{name}-%{version}.tar.bz2
+# Fix CVE-2009-2175 (see RHBZ #647907)
+Patch0:         gnome-xcf-thumbnailer-1.0-CVE-2009-2175.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  GConf2
@@ -23,6 +25,7 @@ Thumbnailer for GIMP's own format, XCF files.
 
 %prep
 %setup -q
+%patch0 -p0 -b .CVE-2009-2175
 
 
 %build
@@ -41,28 +44,15 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %pre
-if [ "$1" -gt 1 ]; then
-  export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
-  gconftool-2 \
-    --makefile-uninstall-rule \
-    %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
-fi
+%gconf_schema_prepare %{name}
 
 
 %post
-export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
-gconftool-2 \
-  --makefile-install-rule \
-  %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
+%gconf_schema_upgrade %{name}
 
 
 %preun
-if [ "$1" -eq 0 ]; then
-  export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
-  gconftool-2 \
-    --makefile-uninstall-rule \
-    %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
-fi
+%gconf_schema_remove %{name}
 
 
 %files
@@ -73,6 +63,10 @@ fi
 
 
 %changelog
+* Fri Oct 29 2010 ELMORABITY Mohamed <melmorabity at fedoraproject.org> 1.0-4
+- Fix RHBZ #64797 (CVE-2009-2175)
+- Update GConf scriptlets to latest specifications
+
 * Tue Feb 17 2010 ELMORABITY Mohamed <melmorabity at fedoraproject.org> 1.0-3
 - Remove %%config tag for GConf schema files
 


More information about the scm-commits mailing list