diff -uraN gimp-2.2.16/app/text/gimpfontlist.c gimp-2.2.17/app/text/gimpfontlist.c --- gimp-2.2.16/app/text/gimpfontlist.c 2007-04-17 23:09:45.000000000 +0200 +++ gimp-2.2.17/app/text/gimpfontlist.c 2007-07-12 17:34:22.000000000 +0200 @@ -181,18 +181,24 @@ { GimpFont *font; gchar *name; + gsize len; if (! desc) return; name = font_desc_to_string (desc); - if (! g_utf8_validate (name, -1, NULL)) + len = strlen (name); + + if (! g_utf8_validate (name, len, NULL)) { g_free (name); return; } + if (g_str_has_suffix (name, " Not-Rotated")) + name[len - strlen (" Not-Rotated")] = '\0'; + font = g_object_new (GIMP_TYPE_FONT, "name", name, "pango-context", context, diff -uraN gimp-2.2.16/app/text/gimptext.c gimp-2.2.17/app/text/gimptext.c --- gimp-2.2.16/app/text/gimptext.c 2007-04-17 23:09:45.000000000 +0200 +++ gimp-2.2.17/app/text/gimptext.c 2007-07-12 17:34:22.000000000 +0200 @@ -385,8 +385,16 @@ text->text = g_value_dup_string (value); break; case PROP_FONT: - g_free (text->font); - text->font = g_value_dup_string (value); + { + const gchar *font = g_value_get_string (value); + gsize len = strlen (font); + + if (g_str_has_suffix (font, " Not-Rotated")) + len -= strlen ( " Not-Rotated"); + + g_free (text->font); + text->font = g_strndup (font, len); + } break; case PROP_FONT_SIZE: text->font_size = g_value_get_double (value); diff -uraN gimp-2.2.16/ChangeLog gimp-2.2.17/ChangeLog --- gimp-2.2.16/ChangeLog 2007-07-06 20:35:27.000000000 +0200 +++ gimp-2.2.17/ChangeLog 2007-07-13 12:22:26.000000000 +0200 @@ -1,3 +1,32 @@ +2007-07-13 Sven Neumann + + * Made 2.2.17 release. + +2007-07-13 Raphaƫl Quinet + + Merged from trunk: + + * plug-ins/common/psd.c (load_image): safeguard to avoid + crashes while loading corrupt PSD images. Fixes bug #327444. + +2007-07-12 Sven Neumann + + Merged from trunk: + Work around Pango appending " Not-Rotated" to font names: + + * app/text/gimptext.c (gimp_text_set_property) + * app/text/gimpfontlist.c (gimp_font_list_add_font): strip + " Not-Rotated" from the font name. + +2007-07-12 Sven Neumann + + * configure.in: bumped version to 2.2.17, interface_age 17. + + Merged from trunk: + + * plug-ins/common/psd.c: don't divide by zero when loading a layer + or mask with zero width or height. Fixes bug #456042. + 2007-07-06 Sven Neumann * Made 2.2.16 release. diff -uraN gimp-2.2.16/configure gimp-2.2.17/configure --- gimp-2.2.16/configure 2007-07-06 10:21:06.000000000 +0200 +++ gimp-2.2.17/configure 2007-07-12 17:35:55.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for GIMP 2.2.16. +# Generated by GNU Autoconf 2.61 for GIMP 2.2.17. # # Report bugs to . # @@ -728,8 +728,8 @@ # Identity of this package. PACKAGE_NAME='GIMP' PACKAGE_TARNAME='gimp' -PACKAGE_VERSION='2.2.16' -PACKAGE_STRING='GIMP 2.2.16' +PACKAGE_VERSION='2.2.17' +PACKAGE_STRING='GIMP 2.2.17' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP' ac_unique_file="app/core/gimp.c" @@ -1649,7 +1649,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GIMP 2.2.16 to adapt to many kinds of systems. +\`configure' configures GIMP 2.2.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1723,7 +1723,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GIMP 2.2.16:";; + short | recursive ) echo "Configuration of GIMP 2.2.17:";; esac cat <<\_ACEOF @@ -1902,7 +1902,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GIMP configure 2.2.16 +GIMP configure 2.2.17 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1916,7 +1916,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GIMP $as_me 2.2.16, which was +It was created by GIMP $as_me 2.2.17, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2589,7 +2589,7 @@ # Define the identity of the package. PACKAGE='gimp' - VERSION='2.2.16' + VERSION='2.2.17' # Some tools Automake needs. @@ -2731,11 +2731,11 @@ GIMP_MAJOR_VERSION=2 GIMP_MINOR_VERSION=2 -GIMP_MICRO_VERSION=16 -GIMP_INTERFACE_AGE=16 -GIMP_BINARY_AGE=216 -GIMP_VERSION=2.2.16 -GIMP_REAL_VERSION=2.2.16 +GIMP_MICRO_VERSION=17 +GIMP_INTERFACE_AGE=17 +GIMP_BINARY_AGE=217 +GIMP_VERSION=2.2.17 +GIMP_REAL_VERSION=2.2.17 GIMP_API_VERSION=2.0 GIMP_APP_VERSION=2.2 GIMP_PLUGIN_VERSION=2.0 @@ -2787,7 +2787,7 @@ -LT_VERSION_INFO="200:16:200" +LT_VERSION_INFO="200:17:200" LT_CURRENT_MINUS_AGE=0 @@ -35728,7 +35728,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GIMP $as_me 2.2.16, which was +This file was extended by GIMP $as_me 2.2.17, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -35781,7 +35781,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GIMP config.status 2.2.16 +GIMP config.status 2.2.17 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -35894,8 +35894,8 @@ gimp_major_ver=2 gimp_minor_ver=2 - gimp_micro_ver=16 - gimp_ver=2.2.16 + gimp_micro_ver=17 + gimp_ver=2.2.17 gimp_api_ver=2.0 diff -uraN gimp-2.2.16/configure.in gimp-2.2.17/configure.in --- gimp-2.2.16/configure.in 2007-07-06 10:19:22.000000000 +0200 +++ gimp-2.2.17/configure.in 2007-07-12 17:34:22.000000000 +0200 @@ -8,11 +8,11 @@ m4_define([gimp_major_version], [2]) m4_define([gimp_minor_version], [2]) -m4_define([gimp_micro_version], [16]) +m4_define([gimp_micro_version], [17]) m4_define([gimp_real_version], [gimp_major_version.gimp_minor_version.gimp_micro_version]) m4_define([gimp_version], [gimp_real_version]) -m4_define([gimp_interface_age], [16]) +m4_define([gimp_interface_age], [17]) m4_define([gimp_binary_age], [m4_eval(100 * gimp_minor_version + gimp_micro_version)]) diff -uraN gimp-2.2.16/devel-docs/app/Makefile gimp-2.2.17/devel-docs/app/Makefile --- gimp-2.2.16/devel-docs/app/Makefile 2007-07-06 10:21:44.000000000 +0200 +++ gimp-2.2.17/devel-docs/app/Makefile 2007-07-12 17:36:30.000000000 +0200 @@ -133,13 +133,13 @@ GIMPPRINT_TOONEW_VERSION = 4.3.0 GIMP_API_VERSION = 2.0 GIMP_APP_VERSION = 2.2 -GIMP_BINARY_AGE = 216 +GIMP_BINARY_AGE = 217 GIMP_DATA_VERSION = 2.0 GIMP_DESKTOP_ICON = wilber-icon.png GIMP_FULL_NAME = The GIMP -GIMP_INTERFACE_AGE = 16 +GIMP_INTERFACE_AGE = 17 GIMP_MAJOR_VERSION = 2 -GIMP_MICRO_VERSION = 16 +GIMP_MICRO_VERSION = 17 GIMP_MINOR_VERSION = 2 GIMP_MKENUMS = $(PERL) $(top_srcdir)/tools/gimp-mkenums GIMP_MODULES = modules @@ -148,7 +148,7 @@ GIMP_PKGCONFIG_VERSION = 2.0 GIMP_PLUGINS = plug-ins GIMP_PLUGIN_VERSION = 2.0 -GIMP_REAL_VERSION = 2.2.16 +GIMP_REAL_VERSION = 2.2.17 GIMP_REMOTE = gimp-remote-2.2$(EXEEXT) GIMP_SYSCONF_VERSION = 2.0 GIMP_THREAD_FLAGS = @@ -156,7 +156,7 @@ GIMP_TOOL_VERSION = 2.0 GIMP_UNSTABLE = no GIMP_USER_VERSION = 2.2 -GIMP_VERSION = 2.2.16 +GIMP_VERSION = 2.2.17 GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include GLIB_GENMARSHAL = glib-genmarshal GLIB_LIBS = -lgobject-2.0 -lglib-2.0 @@ -249,7 +249,7 @@ LN_S = ln -s LTLIBOBJS = LT_CURRENT_MINUS_AGE = 0 -LT_VERSION_INFO = 200:16:200 +LT_VERSION_INFO = 200:17:200 MAIL = mail$(EXEEXT) MAINT = MAINTAINER_MODE_FALSE = # @@ -271,9 +271,9 @@ PACKAGE = gimp PACKAGE_BUGREPORT = http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP PACKAGE_NAME = GIMP -PACKAGE_STRING = GIMP 2.2.16 +PACKAGE_STRING = GIMP 2.2.17 PACKAGE_TARNAME = gimp -PACKAGE_VERSION = 2.2.16 +PACKAGE_VERSION = 2.2.17 PANGOFT2_CFLAGS = -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include PANGOFT2_LIBS = -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 PANGOFT2_REQUIRED_VERSION = 1.4.0 @@ -319,7 +319,7 @@ TIFF = tiff$(EXEEXT) URL = url$(EXEEXT) USE_NLS = yes -VERSION = 2.2.16 +VERSION = 2.2.17 WINCLIPBOARD = WINDRES = : WINPRINT = diff -uraN gimp-2.2.16/devel-docs/app/.svn/entries gimp-2.2.17/devel-docs/app/.svn/entries --- gimp-2.2.16/devel-docs/app/.svn/entries 2007-07-06 11:29:35.000000000 +0200 +++ gimp-2.2.17/devel-docs/app/.svn/entries 2007-07-13 12:22:08.000000000 +0200 @@ -1,7 +1,7 @@ 8 dir -22886 +22923 svn+ssh://neo@svn.gnome.org/svn/gimp/branches/gimp-2-2/devel-docs/app svn+ssh://neo@svn.gnome.org/svn/gimp diff -uraN gimp-2.2.16/devel-docs/app/version gimp-2.2.17/devel-docs/app/version --- gimp-2.2.16/devel-docs/app/version 2007-07-06 10:21:44.000000000 +0200 +++ gimp-2.2.17/devel-docs/app/version 2007-07-12 17:36:30.000000000 +0200 @@ -1 +1 @@ -2.2.16 +2.2.17 diff -uraN gimp-2.2.16/devel-docs/libgimpbase/html/index.html gimp-2.2.17/devel-docs/libgimpbase/html/index.html --- gimp-2.2.16/devel-docs/libgimpbase/html/index.html 2007-07-06 20:36:31.000000000 +0200 +++ gimp-2.2.17/devel-docs/libgimpbase/html/index.html 2007-07-13 13:00:25.000000000 +0200 @@ -15,7 +15,7 @@

- for GIMP 2.2.16 + for GIMP 2.2.17

diff -uraN gimp-2.2.16/devel-docs/libgimpbase/html/libgimpbase-gimpversion.html gimp-2.2.17/devel-docs/libgimpbase/html/libgimpbase-gimpversion.html --- gimp-2.2.16/devel-docs/libgimpbase/html/libgimpbase-gimpversion.html 2007-07-06 20:36:31.000000000 +0200 +++ gimp-2.2.17/devel-docs/libgimpbase/html/libgimpbase-gimpversion.html 2007-07-13 13:00:25.000000000 +0200 @@ -84,7 +84,7 @@

GIMP_MICRO_VERSION

-
#define GIMP_MICRO_VERSION                              (16)
+
#define GIMP_MICRO_VERSION                              (17)
 

@@ -94,7 +94,7 @@

GIMP_VERSION

-
#define GIMP_VERSION                                    "2.2.16"
+
#define GIMP_VERSION                                    "2.2.17"
 

diff -uraN gimp-2.2.16/devel-docs/libgimpbase/xml/gimpversion.xml gimp-2.2.17/devel-docs/libgimpbase/xml/gimpversion.xml --- gimp-2.2.16/devel-docs/libgimpbase/xml/gimpversion.xml 2007-07-06 20:36:31.000000000 +0200 +++ gimp-2.2.17/devel-docs/libgimpbase/xml/gimpversion.xml 2007-07-13 13:00:25.000000000 +0200 @@ -67,14 +67,14 @@ <anchor id="GIMP-MICRO-VERSION:CAPS" role="macro"/>GIMP_MICRO_VERSION -GIMP_MICRO_VERSION#define GIMP_MICRO_VERSION (16) +GIMP_MICRO_VERSION#define GIMP_MICRO_VERSION (17) <anchor id="GIMP-VERSION:CAPS" role="macro"/>GIMP_VERSION -GIMP_VERSION#define GIMP_VERSION "2.2.16" +GIMP_VERSION#define GIMP_VERSION "2.2.17" diff -uraN gimp-2.2.16/libgimpbase/gimpversion.h gimp-2.2.17/libgimpbase/gimpversion.h --- gimp-2.2.16/libgimpbase/gimpversion.h 2007-07-06 10:21:53.000000000 +0200 +++ gimp-2.2.17/libgimpbase/gimpversion.h 2007-07-12 17:36:38.000000000 +0200 @@ -11,8 +11,8 @@ #define GIMP_MAJOR_VERSION (2) #define GIMP_MINOR_VERSION (2) -#define GIMP_MICRO_VERSION (16) -#define GIMP_VERSION "2.2.16" +#define GIMP_MICRO_VERSION (17) +#define GIMP_VERSION "2.2.17" #define GIMP_API_VERSION "2.0" #define GIMP_CHECK_VERSION(major, minor, micro) \ (GIMP_MAJOR_VERSION > (major) || \ diff -uraN gimp-2.2.16/NEWS gimp-2.2.17/NEWS --- gimp-2.2.16/NEWS 2007-07-06 10:19:22.000000000 +0200 +++ gimp-2.2.17/NEWS 2007-07-13 12:23:01.000000000 +0200 @@ -6,6 +6,14 @@ released as GIMP version 2.4. +Bugs fixed in GIMP 2.2.17 +========================= + +- fixed regression in PSD load plug-in (bug #456042) +- fixed crash when loading a corrupt PSD file (bug #327444) +- work around for Pango appending " Not-Rotated" to font names + + Bugs fixed in GIMP 2.2.16 ========================= diff -uraN gimp-2.2.16/plug-ins/common/psd.c gimp-2.2.17/plug-ins/common/psd.c --- gimp-2.2.16/plug-ins/common/psd.c 2007-07-06 10:53:53.000000000 +0200 +++ gimp-2.2.17/plug-ins/common/psd.c 2007-07-13 12:22:08.000000000 +0200 @@ -960,7 +960,7 @@ g_error ("Input file has a larger layer size than GIMP can handle."); } - if (layer->width > (G_MAXUINT / layer->height)) + if (layer->height && layer->width > (G_MAXUINT / layer->height)) { g_error ("Input file has a larger layer size than GIMP can handle."); } @@ -1087,7 +1087,7 @@ g_error ("Input file has a larger layer mask size than GIMP can handle."); } - if (layer->lm_width > (G_MAXUINT / layer->lm_height)) + if (layer->lm_height && layer->lm_width > (G_MAXUINT / layer->lm_height)) { g_error ("Input file has a larger layer mask size than GIMP can handle."); } @@ -2329,7 +2329,9 @@ { gimp_progress_update ((double)1.00); - xfread_interlaced(fd, dest, PSDheader.imgdatalen, + xfread_interlaced(fd, dest, MIN (PSDheader.imgdatalen, + step * PSDheader.columns + * PSDheader.rows), "raw image data", step); } else @@ -2337,7 +2339,9 @@ gimp_progress_update ((double)1.00); cmykbuf = g_malloc(PSDheader.imgdatalen); - xfread_interlaced(fd, cmykbuf, PSDheader.imgdatalen, + xfread_interlaced(fd, cmykbuf, MIN (PSDheader.imgdatalen, + step * PSDheader.columns + * PSDheader.rows), "raw cmyk image data", step); cmykp2rgb(cmykbuf, dest, @@ -2836,7 +2840,7 @@ gimp_filename_to_utf8 (filename)); } - if (PSDheader.columns > (G_MAXUINT / PSDheader.rows)) + if (PSDheader.rows && PSDheader.columns > (G_MAXUINT / PSDheader.rows)) { g_error ("'%s' has a larger image size than GIMP can handle.", gimp_filename_to_utf8 (filename));