<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[114803] trunk/dports/graphics/gimp2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/114803">114803</a></dd>
<dt>Author</dt> <dd>devans@macports.org</dd>
<dt>Date</dt> <dd>2013-12-15 11:29:13 -0800 (Sun, 15 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>gimp2: apply recent upstream patches.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsgimp2Portfile">trunk/dports/graphics/gimp2/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsgimp2filespatcherrorcloseportbz719396diff">trunk/dports/graphics/gimp2/files/patch-error-close-port-bz719396.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchfilexwdsanitycheckcolormapsizeCVE20131913diff">trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-colormap-size-CVE-2013-1913.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchfilexwdsanitychecknumbercolorsCVE20131978diff">trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-number-colors-CVE-2013-1978.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchwidgetdirectionsetsystemlocalenotuserbz679214diff">trunk/dports/graphics/gimp2/files/patch-widget-direction-set-system-locale-not-user-bz679214.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsgimp2Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/gimp2/Portfile (114802 => 114803)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/Portfile        2013-12-15 19:07:43 UTC (rev 114802)
+++ trunk/dports/graphics/gimp2/Portfile        2013-12-15 19:29:13 UTC (rev 114803)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> conflicts gimp2-devel gimp3-devel
</span><span class="cx"> # please remember to update the gimp metapackage to match
</span><span class="cx"> version 2.8.10
</span><del>-revision 1
</del><ins>+revision 2
</ins><span class="cx"> license {GPL-2+ LGPL}
</span><span class="cx"> categories graphics
</span><span class="cx"> maintainers devans
</span><span class="lines">@@ -90,6 +90,10 @@
</span><span class="cx"> patch-brush-outline-not-displayed-bz719593.diff \
</span><span class="cx"> patch-palette-editor-not-working-new-palettes-bz719634.diff \
</span><span class="cx"> patch-plug-in-borderaverage-return-garbage-alpha-value-bz719662.diff \
</span><ins>+ patch-error-close-port-bz719396.diff \
+ patch-file-xwd-sanity-check-colormap-size-CVE-2013-1913.diff \
+ patch-file-xwd-sanity-check-number-colors-CVE-2013-1978.diff \
+ patch-widget-direction-set-system-locale-not-user-bz679214.diff \
</ins><span class="cx"> patch-plug-ins-twain-tw_mac.c.diff
</span><span class="cx">
</span><span class="cx"> platform darwin 9 {
</span></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatcherrorcloseportbz719396diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-error-close-port-bz719396.diff (0 => 114803)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-error-close-port-bz719396.diff         (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-error-close-port-bz719396.diff        2013-12-15 19:29:13 UTC (rev 114803)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+From f1677dea03fa3685887bdcb04f927158cbfeb15c Mon Sep 17 00:00:00 2001
+From: Kevin Cozens <kevin@ve3syb.ca>
+Date: Tue, 03 Dec 2013 01:17:05 +0000
+Subject: Fixed an error in the close-port function. Closes bug #719396.
+
+---
+diff --git a/plug-ins/script-fu/scripts/script-fu.init b/plug-ins/script-fu/scripts/script-fu.init
+index 120ecc7..9f8c5a6 100644
+--- plug-ins/script-fu/scripts/script-fu.init
++++ plug-ins/script-fu/scripts/script-fu.init
+@@ -603,7 +603,7 @@
+
+ (define (close-port p)
+ (cond
+- ((input-output-port? p) (close-input-port (close-output-port p)))
++ ((input-output-port? p) (close-input-port p) (close-output-port p))
+ ((input-port? p) (close-input-port p))
+ ((output-port? p) (close-output-port p))
+ (else (throw "Not a port" p))))
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchfilexwdsanitycheckcolormapsizeCVE20131913diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-colormap-size-CVE-2013-1913.diff (0 => 114803)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-colormap-size-CVE-2013-1913.diff         (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-colormap-size-CVE-2013-1913.diff        2013-12-15 19:29:13 UTC (rev 114803)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+From 7f2322e4ced8ba393abc5a0aa15a607f340f0db8 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 14 Nov 2013 13:29:01 +0000
+Subject: file-xwd: sanity check colormap size (CVE-2013-1913)
+
+(cherry picked from commit 32ae0f83e5748299641cceaabe3f80f1b3afd03e)
+---
+diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
+index 3240f7e..2625f69 100644
+--- plug-ins/common/file-xwd.c
++++ plug-ins/common/file-xwd.c
+@@ -461,6 +461,17 @@ load_image (const gchar *filename,
+ /* Position to start of XWDColor structures */
+ fseek (ifp, (long)xwdhdr.l_header_size, SEEK_SET);
+
++ /* Guard against insanely huge color maps -- gimp_image_set_colormap() only
++ * accepts colormaps with 0..256 colors anyway. */
++ if (xwdhdr.l_colormap_entries > 256)
++ {
++ g_message (_("'%s':\nIllegal number of colormap entries: %ld"),
++ gimp_filename_to_utf8 (filename),
++ (long)xwdhdr.l_colormap_entries);
++ fclose (ifp);
++ return -1;
++ }
++
+ if (xwdhdr.l_colormap_entries > 0)
+ {
+ xwdcolmap = g_new (L_XWDCOLOR, xwdhdr.l_colormap_entries);
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchfilexwdsanitychecknumbercolorsCVE20131978diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-number-colors-CVE-2013-1978.diff (0 => 114803)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-number-colors-CVE-2013-1978.diff         (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-file-xwd-sanity-check-number-colors-CVE-2013-1978.diff        2013-12-15 19:29:13 UTC (rev 114803)
</span><span class="lines">@@ -0,0 +1,152 @@
</span><ins>+From 0ffb3b6753aad00512349bba31bf5113054c6a0e Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Tue, 26 Nov 2013 09:49:42 +0000
+Subject: file-xwd: sanity check # of colors and map entries (CVE-2013-1978)
+
+The number of colors in an image shouldn't be higher than the number of
+colormap entries. Additionally, consolidate post error cleanup in
+load_image().
+
+(cherry picked from commit 23f685931e5f000dd033a45c60c1e60d7f78caf4)
+---
+diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
+index 2625f69..ba07afd 100644
+--- plug-ins/common/file-xwd.c
++++ plug-ins/common/file-xwd.c
+@@ -424,9 +424,9 @@ static gint32
+ load_image (const gchar *filename,
+ GError **error)
+ {
+- FILE *ifp;
++ FILE *ifp = NULL;
+ gint depth, bpp;
+- gint32 image_ID;
++ gint32 image_ID = -1;
+ L_XWDFILEHEADER xwdhdr;
+ L_XWDCOLOR *xwdcolmap = NULL;
+
+@@ -436,7 +436,7 @@ load_image (const gchar *filename,
+ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
+ _("Could not open '%s' for reading: %s"),
+ gimp_filename_to_utf8 (filename), g_strerror (errno));
+- return -1;
++ goto out;
+ }
+
+ read_xwd_header (ifp, &xwdhdr);
+@@ -445,8 +445,7 @@ load_image (const gchar *filename,
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Could not read XWD header from '%s'"),
+ gimp_filename_to_utf8 (filename));
+- fclose (ifp);
+- return -1;
++ goto out;
+ }
+
+ #ifdef XWD_COL_WAIT_DEBUG
+@@ -468,12 +467,18 @@ load_image (const gchar *filename,
+ g_message (_("'%s':\nIllegal number of colormap entries: %ld"),
+ gimp_filename_to_utf8 (filename),
+ (long)xwdhdr.l_colormap_entries);
+- fclose (ifp);
+- return -1;
++ goto out;
+ }
+
+ if (xwdhdr.l_colormap_entries > 0)
+ {
++ if (xwdhdr.l_colormap_entries < xwdhdr.l_ncolors)
++ {
++ g_message (_("'%s':\nNumber of colormap entries < number of colors"),
++ gimp_filename_to_utf8 (filename));
++ goto out;
++ }
++
+ xwdcolmap = g_new (L_XWDCOLOR, xwdhdr.l_colormap_entries);
+
+ read_xwd_cols (ifp, &xwdhdr, xwdcolmap);
+@@ -493,9 +498,7 @@ load_image (const gchar *filename,
+ if (xwdhdr.l_file_version != 7)
+ {
+ g_message (_("Can't read color entries"));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+ }
+
+@@ -503,9 +506,7 @@ load_image (const gchar *filename,
+ {
+ g_message (_("'%s':\nNo image width specified"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ if (xwdhdr.l_pixmap_width > GIMP_MAX_IMAGE_SIZE
+@@ -513,27 +514,21 @@ load_image (const gchar *filename,
+ {
+ g_message (_("'%s':\nImage width is larger than GIMP can handle"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ if (xwdhdr.l_pixmap_height <= 0)
+ {
+ g_message (_("'%s':\nNo image height specified"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ if (xwdhdr.l_pixmap_height > GIMP_MAX_IMAGE_SIZE)
+ {
+ g_message (_("'%s':\nImage height is larger than GIMP can handle"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ gimp_progress_init_printf (_("Opening '%s'"),
+@@ -582,11 +577,6 @@ load_image (const gchar *filename,
+ }
+ gimp_progress_update (1.0);
+
+- fclose (ifp);
+-
+- if (xwdcolmap)
+- g_free (xwdcolmap);
+-
+ if (image_ID == -1 && ! (error && *error))
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("XWD-file %s has format %d, depth %d and bits per pixel %d. "
+@@ -594,6 +584,17 @@ load_image (const gchar *filename,
+ gimp_filename_to_utf8 (filename),
+ (gint) xwdhdr.l_pixmap_format, depth, bpp);
+
++out:
++ if (ifp)
++ {
++ fclose (ifp);
++ }
++
++ if (xwdcolmap)
++ {
++ g_free (xwdcolmap);
++ }
++
+ return image_ID;
+ }
+
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchwidgetdirectionsetsystemlocalenotuserbz679214diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-widget-direction-set-system-locale-not-user-bz679214.diff (0 => 114803)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-widget-direction-set-system-locale-not-user-bz679214.diff         (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-widget-direction-set-system-locale-not-user-bz679214.diff        2013-12-15 19:29:13 UTC (rev 114803)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+From c1314499ffa6aa4cf7543e00b028d987209fa6fc Mon Sep 17 00:00:00 2001
+From: Jehan <jehan@girinstud.io>
+Date: Mon, 09 Dec 2013 06:31:48 +0000
+Subject: Bug 679214 - widget direction set to system locale, not user-set lang
+
+In particular a RTL-localized OS, where the user sets GIMP to a LTR lang
+would still have a RTL UI (menus, etc.). And vice versa.
+(cherry picked from commit 735f00b886283f0a8fcee5ac9b414543f19a6ef4)
+---
+diff --git a/app/gui/gui.c b/app/gui/gui.c
+index faaa91b..3f65546 100644
+--- app/gui/gui.c
++++ app/gui/gui.c
+@@ -198,6 +198,17 @@ gui_init (Gimp *gimp,
+
+ the_gui_gimp = gimp;
+
++ /* Normally this should have been taken care of during command line
++ * parsing as a post-parse hook of gtk_get_option_group(), using the
++ * system locales.
++ * But user config may have overriden the language, therefore we must
++ * check the widget directions again.
++ */
++ if (g_strcmp0 (dgettext ("gtk20", "default:LTR"), "default:RTL") == 0)
++ gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
++ else
++ gtk_widget_set_default_direction (GTK_TEXT_DIR_LTR);
++
+ gui_unique_init (gimp);
+
+ gimp_widgets_init (gui_help_func,
+--
+cgit v0.9.2
</ins></span></pre>
</div>
</div>
</body>
</html>