From df2aaadddcd9fb59eef10a39b3e0dd284f1c3fd0 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Mon, 4 Apr 2011 11:29:04 +0200 Subject: [PATCH] don't dereference unset xsane.preview (#693224) --- xsane-0.998-xsane_update_param-crash.patch | 32 ++++++++++++++++++++++ xsane.spec | 7 +++++ 2 files changed, 39 insertions(+) create mode 100644 xsane-0.998-xsane_update_param-crash.patch diff --git a/xsane-0.998-xsane_update_param-crash.patch b/xsane-0.998-xsane_update_param-crash.patch new file mode 100644 index 0000000..4b18585 --- /dev/null +++ b/xsane-0.998-xsane_update_param-crash.patch @@ -0,0 +1,32 @@ +From 173a9a51f4d79a9d76987a9e425a64038c887b3e Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 4 Apr 2011 11:16:16 +0200 +Subject: [PATCH] patch: xsane_update_param-crash + +Squashed commit of the following: + +commit 4b2f69d1b51db7160a33764a4f68ab3c4fc43678 +Author: Nils Philippsen +Date: Mon Apr 4 11:13:20 2011 +0200 + + don't dereference xsane.preview if it is NULL +--- + src/xsane-front-gtk.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/xsane-front-gtk.c b/src/xsane-front-gtk.c +index 08761a0..66a3177 100644 +--- a/src/xsane-front-gtk.c ++++ b/src/xsane-front-gtk.c +@@ -1713,7 +1713,7 @@ void xsane_update_param(void *arg) + gtk_label_set(GTK_LABEL(xsane.info_label), buf); + + +- if (xsane.preview->surface_unit == SANE_UNIT_MM) ++ if (xsane.preview && xsane.preview->surface_unit == SANE_UNIT_MM) + { + double dx, dy; + +-- +1.7.4.2 + diff --git a/xsane.spec b/xsane.spec index 3459ae1..b2432da 100644 --- a/xsane.spec +++ b/xsane.spec @@ -34,6 +34,9 @@ Patch4: xsane-0.997-no-file-selected.patch Patch5: xsane-0.997-ipv6.patch # distro-specific: customize desktop file Patch6: xsane-0.998-desktop-file.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=693224 +# submitted to upstream (Oliver Rauch) via email, 2011-04-04 +Patch7: xsane-0.998-xsane_update_param-crash.patch # autoconf-generated files Patch100: xsane-0.998-1-autoconf.patch.bz2 License: GPLv2+ @@ -91,6 +94,7 @@ done %patch4 -p1 -b .no-file-selected %patch5 -p1 -b .ipv6 %patch6 -p1 -b .desktop-file +%patch7 -p1 -b .xsane_update_param-crash %patch100 -p1 -b .autoconf @@ -161,6 +165,9 @@ fi %{_datadir}/sane/xsane %changelog +* Mon Apr 04 2011 Nils Philippsen - 0.998-3 +- don't dereference unset xsane.preview (#693224) + * Tue Feb 08 2011 Fedora Release Engineering - 0.998-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild