After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 112066 - pixbuf engine should do more sanity check
pixbuf engine should do more sanity check
Status: RESOLVED FIXED
Product: gtk-engines
Classification: Deprecated
Component: general
2.2.x
Other All
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-05-02 11:38 UTC by MINAMI Hirokazu
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description MINAMI Hirokazu 2003-05-02 11:38:08 UTC
strcmp (match_data->detail, image->match_data.detail)

is called in pixbuf/pixbuf-draw.c without checking match_data->detail. The
pointer can be NULL under CrystalSphere theme and causes some application
(I tried sodipodi) to crash.

Following patch was enough for me.

--- gtk2-engines-2.2.0/pixbuf/pixbuf-draw.c
+++ gtk2-engines-2.2.0-patched/pixbuf/pixbuf-draw.c
@@ -76,3 +76,3 @@

-      if (image->match_data.detail &&
+      if (image->match_data.detail && match_data->detail &&
          (!image->match_data.detail ||
Comment 1 MINAMI Hirokazu 2003-05-16 07:45:42 UTC
the theme i had used was SphereCrystal v0.7--not CrystalSphere. sorry.

Comment 2 Morten Welinder 2004-03-09 18:01:42 UTC
This looks like the cause of a large number of gnumeric crash bugs.
Since patch looks harmless, can this go in, please?

(Our troubles are with the 6nome theme under SuSE)
Comment 3 Matthias Clasen 2004-03-16 23:53:17 UTC
But I think the patch is not quite correct, it should be

*** pixbuf-draw.c.~1.14.~	2002-09-07 02:35:57.000000000 +0200
--- pixbuf-draw.c	2004-03-17 00:54:54.000000000 +0100
***************
*** 75,81 ****
  	continue;
  
        if (image->match_data.detail &&
! 	  (!image->match_data.detail ||
  	   strcmp (match_data->detail, image->match_data.detail) != 0))
        continue;
  
--- 75,81 ----
  	continue;
  
        if (image->match_data.detail &&
! 	  (!match_data->detail ||
  	   strcmp (match_data->detail, image->match_data.detail) != 0))
        continue;
  
Comment 4 Owen Taylor 2004-03-17 21:44:00 UTC
Yes, Matthias's version is the correct one 
 
image  match_data
 "foo" "bar"      => no match
 "foo" NULL       => no match
 NULL  "bar"      => match
 NULL  NULL       => match

Wed Mar 17 16:38:00 2004  Owen Taylor  <otaylor@redhat.com>
 
        * pixbuf-draw.c (match_theme_image): Fix problem with
        NULL details. (#112066, MINAMI Hirokazu, Matthias Clasen)