GNOME Bugzilla – Bug 112066
pixbuf engine should do more sanity check
Last modified: 2004-12-22 21:47:04 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 ||
the theme i had used was SphereCrystal v0.7--not CrystalSphere. sorry.
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)
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;
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)