From 6a687c507b9f007d5d7a4d3270d403c4d55831c0 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Jun 17 2014 09:29:36 +0000 Subject: Retrieve a printable CMS image profile and screen profile description to avoid crashing g_markup (#1110073). --- diff --git a/geeqie-1.1-lcms2.patch b/geeqie-1.1-lcms2.patch index 3eb34a3..875a586 100644 --- a/geeqie-1.1-lcms2.patch +++ b/geeqie-1.1-lcms2.patch @@ -1,6 +1,6 @@ diff -Nurb --strip-trailing-cr geeqie-1.1-orig/configure.in geeqie-1.1/configure.in --- geeqie-1.1-orig/configure.in 2012-08-12 22:13:40.000000000 +0200 -+++ geeqie-1.1/configure.in 2013-12-09 18:34:25.367495538 +0100 ++++ geeqie-1.1/configure.in 2014-06-17 11:17:19.991826252 +0200 @@ -275,6 +275,13 @@ [liblcms=$enableval], [liblcms=auto]) @@ -25,7 +25,7 @@ diff -Nurb --strip-trailing-cr geeqie-1.1-orig/configure.in geeqie-1.1/configure fi diff -Nurb --strip-trailing-cr geeqie-1.1-orig/src/color-man.c geeqie-1.1/src/color-man.c --- geeqie-1.1-orig/src/color-man.c 2012-08-12 22:13:41.000000000 +0200 -+++ geeqie-1.1/src/color-man.c 2013-12-09 18:34:07.441461661 +0100 ++++ geeqie-1.1/src/color-man.c 2014-06-17 11:18:46.532202184 +0200 @@ -21,7 +21,11 @@ #ifdef HAVE_LCMS /*** color support enabled ***/ @@ -48,24 +48,22 @@ diff -Nurb --strip-trailing-cr geeqie-1.1-orig/src/color-man.c geeqie-1.1/src/co } static cmsHPROFILE color_man_create_adobe_comp(void) -@@ -425,7 +431,14 @@ +@@ -425,7 +431,11 @@ case COLOR_PROFILE_FILE: if (profile) { -+#ifdef HAVE_LCMS2 -+ cmsUInt8Number profileID[17]; -+ profileID[16] = '\0'; -+ cmsGetHeaderProfileID(profile, profileID); -+ return g_strdup(profileID); -+#else - return g_strdup(cmsTakeProductName(profile)); -+#endif +- return g_strdup(cmsTakeProductName(profile)); ++ cmsUInt32Number r; ++ char buffer[20]; ++ buffer[0] = '\0'; ++ r = cmsGetProfileInfoASCII(profile, cmsInfoDescription, "en", "US", &buffer, 20); ++ return g_strdup(buffer); } return g_strdup(_("Custom profile")); break; diff -Nurb --strip-trailing-cr geeqie-1.1-orig/src/exif-common.c geeqie-1.1/src/exif-common.c --- geeqie-1.1-orig/src/exif-common.c 2012-08-12 22:13:41.000000000 +0200 -+++ geeqie-1.1/src/exif-common.c 2013-12-09 18:34:07.442461606 +0100 ++++ geeqie-1.1/src/exif-common.c 2014-06-17 11:17:19.993826145 +0200 @@ -23,10 +23,10 @@ #ifdef HAVE_LCMS /*** color support enabled ***/ diff --git a/geeqie.spec b/geeqie.spec index 6b99799..5f0ebca 100644 --- a/geeqie.spec +++ b/geeqie.spec @@ -8,7 +8,7 @@ Summary: Image browser and viewer Name: geeqie Version: 1.1 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2+ Group: User Interface/X Source: http://downloads.sf.net/sourceforge/geeqie/%{name}-%{upstreamversion}.tar.gz @@ -36,12 +36,11 @@ Patch6: geeqie-1.1-collection-and-history-inexistent-files.patch # reported upstream # https://sourceforge.net/tracker/?func=detail&aid=3605406&group_id=222125&atid=1054682 Patch7: geeqie-1.1-large-files.patch -# LCMS2 patch from Geeqie-devel mailing-list +# LCMS2 patch originally from Geeqie-devel mailing-list +# but modified/revised for bug-fixes Patch8: geeqie-1.1-lcms2.patch # from master Patch9: geeqie-1.1-percent-char-in-filenames.patch -# don't print CMS screen profileID "garbage" that crashes g_markup -Patch10: geeqie-1.1-cms-screen-profile.patch BuildRequires: gtk2-devel %if %{with lcms1} @@ -102,7 +101,6 @@ done autoreconf -f -i %endif %patch9 -p1 -b .percent-char-in-filenames -%patch10 -p1 -b .cms-screen-profile %build %configure --enable-lirc --disable-tiff \ @@ -152,6 +150,10 @@ update-desktop-database &> /dev/null || : %changelog +* Tue Jun 17 2014 Michael Schwendt - 1.1-20 +- Retrieve a printable CMS image profile and screen profile description + to avoid crashing g_markup (#1110073). + * Wed May 28 2014 Michael Schwendt - 1.1-19 - Don't print CMS screen profileID garbage that crashes g_markup (this should also fix #1051660).