[gimp] fix crash in lcms plug-in
Nils Philippsen
nphilipp at fedoraproject.org
Thu Nov 7 12:23:46 UTC 2013
commit f999a9886f3fb6f50e48e40eca7becf85e343135
Author: Nils Philippsen <nils at redhat.com>
Date: Thu Nov 7 13:16:12 2013 +0100
fix crash in lcms plug-in
gimp-2.8.8-lcms-profile-crash.patch | 48 +++++++++++++++++++++++++++++++++++
gimp.spec | 8 ++++++
2 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/gimp-2.8.8-lcms-profile-crash.patch b/gimp-2.8.8-lcms-profile-crash.patch
new file mode 100644
index 0000000..f9b8a47
--- /dev/null
+++ b/gimp-2.8.8-lcms-profile-crash.patch
@@ -0,0 +1,48 @@
+From 9962e79ff981778416081c5832c63ab6c78e9e6a Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Thu, 7 Nov 2013 13:08:02 +0100
+Subject: [PATCH] patch: lcms-profile-crash
+
+Squashed commit of the following:
+
+commit c733e96b9230ef22c41779171890af885d196b95
+Author: Michael Natterer <mitch at gimp.org>
+Date: Mon Nov 4 23:17:41 2013 +0100
+
+ Bug 709857 - Lcms plugin crashes if RGB profile does not exist
+
+ Always check the return value of lcms_load_profile(config->rgb_profile)
+ and use the builtin sRGB profile if it returns NULL.
+
+ (cherry picked from commit 961d03d795e1ab32923f31e7f979f601403cdf41)
+ (cherry picked from commit dc6ccc17495bcabbd96d4c18616cb4b57bd07ea6)
+---
+ plug-ins/common/lcms.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
+index 3fa26db..87373fc 100644
+--- a/plug-ins/common/lcms.c
++++ b/plug-ins/common/lcms.c
+@@ -1493,7 +1493,7 @@ lcms_icc_combo_box_new (GimpColorConfig *config,
+ gchar *history;
+ gchar *label;
+ gchar *name;
+- cmsHPROFILE profile;
++ cmsHPROFILE profile = NULL;
+
+ dialog = lcms_icc_file_chooser_dialog_new ();
+ history = gimp_personal_rc_file ("profilerc");
+@@ -1508,7 +1508,8 @@ lcms_icc_combo_box_new (GimpColorConfig *config,
+
+ if (config->rgb_profile)
+ profile = lcms_load_profile (config->rgb_profile, NULL);
+- else
++
++ if (! profile)
+ profile = cmsCreate_sRGBProfile ();
+
+ name = lcms_icc_profile_get_desc (profile);
+--
+1.8.4.2
+
diff --git a/gimp.spec b/gimp.spec
index 82aae76..80e4557 100644
--- a/gimp.spec
+++ b/gimp.spec
@@ -206,6 +206,10 @@ Patch0: gimp-%{version}%{dashprerel}-git%{gitrev}.patch.bz2
# Fedora specific.
Patch1: gimp-2.8.2-cm-system-monitor-profile-by-default.patch
+# Avoid crash in lcms plug-in.
+# Upstream commit dc6ccc17495bcabbd96d4c18616cb4b57bd07ea6
+Patch2: gimp-2.8.8-lcms-profile-crash.patch
+
# use external help browser directly if help browser plug-in is not built
Patch100: gimp-2.8.6-external-help-browser.patch
@@ -295,6 +299,7 @@ EOF
%endif
%patch1 -p1 -b .cm-system-monitor-profile-by-default
+%patch2 -p1 -b .lcms-profile-crash
%if ! %{with helpbrowser}
%patch100 -p1 -b .external-help-browser
@@ -608,6 +613,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%changelog
+* Thu Nov 07 2013 Nils Philippsen <nils at redhat.com>
+- fix crash in lcms plug-in
+
* Mon Nov 04 2013 Nils Philippsen <nils at redhat.com> - 2:2.8.8-1
- version 2.8.8
More information about the scm-commits
mailing list