From 0a1d44f9d02d61f2b34e7a649265b764e0da8e4da2d4670f36f45e827bf3da73 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 1 Mar 2011 09:13:14 +0000 Subject: [PATCH 1/3] Updating link to change in openSUSE:Factory/pango revision 60.0 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/pango?expand=0&rev=ef67ddd6254fc2d26c64ce79f1b12724 --- pango.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pango.spec b/pango.spec index fbd1e55..1fdc55f 100644 --- a/pango.spec +++ b/pango.spec @@ -1,7 +1,7 @@ # -# spec file for package pango (Version 1.28.3) +# spec file for package pango # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ Name: pango License: LGPLv2.1+ Group: System/Libraries Version: 1.28.3 -Release: 1 +Release: 5 # NOTE: on upgrade to a new upstream version, change the Obsoletes from <= to < (here and in baselibs.conf) Summary: Library for Layout and Rendering of Text Source: ftp://ftp.gnome.org/pub/GNOME/sources/pango/1.18/%{name}-%{version}.tar.bz2 From 3f328300ab7e3ddc4399c093fe43fb7b4eb311c59b4316674248ea1f217d684b Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 20 Apr 2011 11:14:19 +0000 Subject: [PATCH 2/3] Accepting request 67442 from GNOME:Next thanks OBS-URL: https://build.opensuse.org/request/show/67442 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/pango?expand=0&rev=63 --- baselibs.conf | 2 +- pango-1.28.3.tar.bz2 | 3 - pango-1.28.4.tar.bz2 | 3 + pango-CVE-2011-0020.patch | 50 ---------- pango-CVE-2011-0064.patch | 186 -------------------------------------- pango.changes | 16 ++++ pango.spec | 14 +-- 7 files changed, 23 insertions(+), 251 deletions(-) delete mode 100644 pango-1.28.3.tar.bz2 create mode 100644 pango-1.28.4.tar.bz2 delete mode 100644 pango-CVE-2011-0020.patch delete mode 100644 pango-CVE-2011-0064.patch diff --git a/baselibs.conf b/baselibs.conf index e565e1c..07aa049 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -2,7 +2,7 @@ libpango-1_0-0 +/etc/pango/pango(64)?.modules requires "pango-tools-" provides "pango- = " - obsoletes "pango- <= " + obsoletes "pango- < " post "%if "%_lib" == "lib64"" post "if test -f %{_bindir}/pango-querymodules-64; then %{_bindir}/pango-querymodules-64 > %{_sysconfdir}/pango/pango64.modules; fi" post "%else" diff --git a/pango-1.28.3.tar.bz2 b/pango-1.28.3.tar.bz2 deleted file mode 100644 index ec74891..0000000 --- a/pango-1.28.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e278bc9430cc7bb00270f183360d262c5006b51248e8b537ea904573f200632 -size 1509501 diff --git a/pango-1.28.4.tar.bz2 b/pango-1.28.4.tar.bz2 new file mode 100644 index 0000000..60704be --- /dev/null +++ b/pango-1.28.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7eb035bcc10dd01569a214d5e2bc3437de95d9ac1cfa9f50035a687c45f05a9f +size 1503441 diff --git a/pango-CVE-2011-0020.patch b/pango-CVE-2011-0020.patch deleted file mode 100644 index 960e4b1..0000000 --- a/pango-CVE-2011-0020.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4e6248d76f55c6184f28afe614d7d76b6fa3d455 Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod -Date: Thu, 17 Feb 2011 16:19:48 +0000 -Subject: Bug 639882 - Heap corruption in font parsing with FreeType2 backend - ---- -diff --git a/pango/pangoft2-render.c b/pango/pangoft2-render.c -index bd3b7d4..42923f4 100644 ---- a/pango/pangoft2-render.c -+++ b/pango/pangoft2-render.c -@@ -121,9 +121,14 @@ pango_ft2_font_render_box_glyph (int width, - - box->bitmap.width = width; - box->bitmap.rows = height; -- box->bitmap.pitch = height; -+ box->bitmap.pitch = width; - -- box->bitmap.buffer = g_malloc0 (box->bitmap.rows * box->bitmap.pitch); -+ box->bitmap.buffer = g_malloc0_n (box->bitmap.rows, box->bitmap.pitch); -+ -+ if (G_UNLIKELY (!box->bitmap.buffer)) { -+ g_slice_free (PangoFT2RenderedGlyph, box); -+ return NULL; -+ } - - /* draw the box */ - for (j = 0; j < line_width; j++) -@@ -226,6 +231,11 @@ pango_ft2_font_render_glyph (PangoFont *font, - rendered->bitmap_left = face->glyph->bitmap_left; - rendered->bitmap_top = face->glyph->bitmap_top; - -+ if (G_UNLIKELY (!rendered->bitmap.buffer)) { -+ g_slice_free (PangoFT2RenderedGlyph, rendered); -+ return NULL; -+ } -+ - return rendered; - } - else -@@ -276,6 +286,8 @@ pango_ft2_renderer_draw_glyph (PangoRenderer *renderer, - if (rendered_glyph == NULL) - { - rendered_glyph = pango_ft2_font_render_glyph (font, glyph); -+ if (rendered_glyph == NULL) -+ return; - add_glyph_to_cache = TRUE; - } - --- -cgit v0.8.3.4 diff --git a/pango-CVE-2011-0064.patch b/pango-CVE-2011-0064.patch deleted file mode 100644 index 1802352..0000000 --- a/pango-CVE-2011-0064.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 3104961bc0ffaf847d2a1e116e6de4fdc1cd8ada Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod -Date: Thu, 2 Dec 2010 16:00:46 +1300 -Subject: [PATCH] Handle realloc failure in the buffer - -Ported from http://cgit.freedesktop.org/harfbuzz/commit/?id=a6a79df5fe2e -by Karl Tomlinson ---- - pango/opentype/hb-buffer-private.h | 1 + - pango/opentype/hb-buffer.c | 70 +++++++++++++++++++++--------------- - pango/opentype/hb-buffer.h | 2 +- - 3 files changed, 43 insertions(+), 30 deletions(-) - -diff --git a/pango/opentype/hb-buffer-private.h b/pango/opentype/hb-buffer-private.h -index 45cdc4d..f194786 100644 ---- a/pango/opentype/hb-buffer-private.h -+++ b/pango/opentype/hb-buffer-private.h -@@ -72,6 +72,7 @@ struct _hb_buffer_t { - unsigned int allocated; - - hb_bool_t have_output; /* weather we have an output buffer going on */ -+ hb_bool_t in_error; /* Allocation failed */ - unsigned int in_length; - unsigned int out_length; - unsigned int in_pos; -diff --git a/pango/opentype/hb-buffer.c b/pango/opentype/hb-buffer.c -index 93b51e5..e9788ad 100644 ---- a/pango/opentype/hb-buffer.c -+++ b/pango/opentype/hb-buffer.c -@@ -52,23 +52,21 @@ static hb_buffer_t _hb_buffer_nil = { - * in_string and out_string. - */ - --/* XXX err handling */ -- - /* Internal API */ - --static void -+static hb_bool_t - hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) - { -- hb_buffer_ensure (buffer, size); -+ if (HB_UNLIKELY (!hb_buffer_ensure (buffer, size))) return FALSE; - if (buffer->out_string == buffer->in_string) - { - assert (buffer->have_output); -- if (!buffer->positions) -- buffer->positions = calloc (buffer->allocated, sizeof (buffer->positions[0])); - - buffer->out_string = (hb_internal_glyph_info_t *) buffer->positions; - memcpy (buffer->out_string, buffer->in_string, buffer->out_length * sizeof (buffer->out_string[0])); - } -+ -+ return TRUE; - } - - /* Public API */ -@@ -114,6 +112,7 @@ void - hb_buffer_clear (hb_buffer_t *buffer) - { - buffer->have_output = FALSE; -+ buffer->in_error = FALSE; - buffer->in_length = 0; - buffer->out_length = 0; - buffer->in_pos = 0; -@@ -122,32 +121,42 @@ hb_buffer_clear (hb_buffer_t *buffer) - buffer->max_lig_id = 0; - } - --void -+hb_bool_t - hb_buffer_ensure (hb_buffer_t *buffer, unsigned int size) - { -- unsigned int new_allocated = buffer->allocated; -- -- if (size > new_allocated) -+ if (HB_UNLIKELY (size > buffer->allocated)) - { -+ unsigned int new_allocated = buffer->allocated; -+ hb_internal_glyph_position_t *new_pos; -+ hb_internal_glyph_info_t *new_info; -+ hb_bool_t separate_out; -+ -+ if (HB_UNLIKELY (buffer->in_error)) -+ return FALSE; -+ -+ separate_out = buffer->out_string != buffer->in_string; -+ - while (size > new_allocated) - new_allocated += (new_allocated >> 1) + 8; - -- if (buffer->positions) -- buffer->positions = realloc (buffer->positions, new_allocated * sizeof (buffer->positions[0])); -+ new_pos = (hb_internal_glyph_position_t *) realloc (buffer->positions, new_allocated * sizeof (buffer->positions[0])); -+ new_info = (hb_internal_glyph_info_t *) realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0])); - -- if (buffer->out_string != buffer->in_string) -- { -- buffer->in_string = realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0])); -- buffer->out_string = (hb_internal_glyph_info_t *) buffer->positions; -- } -- else -- { -- buffer->in_string = realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0])); -- buffer->out_string = buffer->in_string; -- } -+ if (HB_UNLIKELY (!new_pos || !new_info)) -+ buffer->in_error = TRUE; -+ -+ if (HB_LIKELY (new_pos)) -+ buffer->positions = new_pos; - -- buffer->allocated = new_allocated; -+ if (HB_LIKELY (new_info)) -+ buffer->in_string = new_info; -+ -+ buffer->out_string = separate_out ? (hb_internal_glyph_info_t *) buffer->positions : buffer->in_string; -+ if (HB_LIKELY (!buffer->in_error)) -+ buffer->allocated = new_allocated; - } -+ -+ return HB_LIKELY (!buffer->in_error); - } - - void -@@ -158,7 +167,7 @@ hb_buffer_add_glyph (hb_buffer_t *buffer, - { - hb_internal_glyph_info_t *glyph; - -- hb_buffer_ensure (buffer, buffer->in_length + 1); -+ if (HB_UNLIKELY (!hb_buffer_ensure (buffer, buffer->in_length + 1))) return; - - glyph = &buffer->in_string[buffer->in_length]; - glyph->codepoint = codepoint; -@@ -213,6 +222,8 @@ _hb_buffer_swap (hb_buffer_t *buffer) - - assert (buffer->have_output); - -+ if (HB_UNLIKELY (buffer->in_error)) return; -+ - if (buffer->out_string != buffer->in_string) - { - hb_internal_glyph_info_t *tmp_string; -@@ -265,7 +276,8 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer, - if (buffer->out_string != buffer->in_string || - buffer->out_pos + num_out > buffer->in_pos + num_in) - { -- hb_buffer_ensure_separate (buffer, buffer->out_pos + num_out); -+ if (HB_UNLIKELY (!hb_buffer_ensure_separate (buffer, buffer->out_pos + num_out))) -+ return; - } - - mask = buffer->in_string[buffer->in_pos].mask; -@@ -302,7 +314,7 @@ _hb_buffer_add_output_glyph (hb_buffer_t *buffer, - - if (buffer->out_string != buffer->in_string) - { -- hb_buffer_ensure (buffer, buffer->out_pos + 1); -+ if (HB_UNLIKELY (!hb_buffer_ensure (buffer, buffer->out_pos + 1))) return; - buffer->out_string[buffer->out_pos] = buffer->in_string[buffer->in_pos]; - } - else if (buffer->out_pos != buffer->in_pos) -@@ -332,7 +344,7 @@ _hb_buffer_next_glyph (hb_buffer_t *buffer) - - if (buffer->out_string != buffer->in_string) - { -- hb_buffer_ensure (buffer, buffer->out_pos + 1); -+ if (HB_UNLIKELY (!hb_buffer_ensure (buffer, buffer->out_pos + 1))) return; - buffer->out_string[buffer->out_pos] = buffer->in_string[buffer->in_pos]; - } - else if (buffer->out_pos != buffer->in_pos) -diff --git a/pango/opentype/hb-buffer.h b/pango/opentype/hb-buffer.h -index b030ba9..aaf6694 100644 ---- a/pango/opentype/hb-buffer.h -+++ b/pango/opentype/hb-buffer.h -@@ -94,7 +94,7 @@ hb_buffer_clear (hb_buffer_t *buffer); - void - hb_buffer_clear_positions (hb_buffer_t *buffer); - --void -+hb_bool_t - hb_buffer_ensure (hb_buffer_t *buffer, - unsigned int size); - --- -1.7.2.2 diff --git a/pango.changes b/pango.changes index 281ca32..c355c56 100644 --- a/pango.changes +++ b/pango.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Tue Apr 5 11:41:02 UTC 2011 - fcrozat@novell.com + +- Update to version 1.28.4: + + Various introspection annotation fixes + + Build fixes + + Require glib >= 2.24.0 + + Bugs fixed: + - bgo#636348: Hex boxes are incorrectly scaled with non + identity cairo scale. + - bgo#639882: Heap corruption in font parsing with FreeType2 + backend. +- Update Obsoletes on library package (from <= to < ). +- Drop pango-CVE-2011-0064.patch and pango-CVE-2011-0020.patch: + fixed upstream. + ------------------------------------------------------------------- Mon Feb 28 09:32:26 CET 2011 - vuntz@opensuse.org diff --git a/pango.spec b/pango.spec index 1fdc55f..729a0cb 100644 --- a/pango.spec +++ b/pango.spec @@ -22,9 +22,8 @@ Name: pango License: LGPLv2.1+ Group: System/Libraries -Version: 1.28.3 -Release: 5 -# NOTE: on upgrade to a new upstream version, change the Obsoletes from <= to < (here and in baselibs.conf) +Version: 1.28.4 +Release: 1 Summary: Library for Layout and Rendering of Text Source: ftp://ftp.gnome.org/pub/GNOME/sources/pango/1.18/%{name}-%{version}.tar.bz2 Source1: README.SuSE @@ -32,10 +31,6 @@ Source2: macros.pango Source99: baselibs.conf # PATCH-FIX-UPSTREAM pango64.patch bgo129534 -- needed for biarch. Unfortunately, this is not good enough for usptream. Patch0: pango64.patch -# PATCH-FIX-UPSTREAM pango-CVE-2011-0020.patch bnc#666101 CVE-2011-0020 vuntz@opensuse.org -- heap corruption in font parsing with FreeType2 backend -Patch1: pango-CVE-2011-0020.patch -# PATCH-FIX-UPSTREAM pango-CVE-2011-0064.patch bnc#672502 CVE-2011-0064. vuntz@opensuse.org -- handle realloc failure in the buffer -Patch2: pango-CVE-2011-0064.patch BuildRequires: gcc-c++ BuildRequires: gtk-doc BuildRequires: pkg-config @@ -62,8 +57,7 @@ Summary: Library for Layout and Rendering of Text Group: System/Libraries Requires(post): %{name}-tools Provides: %{name} = %{version} -# Note: we keep <= (and a rpmlint warning...) until we get a version higher than 1.28.3 (when this provides/obsoletes was introduced) -Obsoletes: %{name} <= %{version} +Obsoletes: %{name} < %{version} # bug437293 %ifarch ppc64 Obsoletes: pango-64bit @@ -132,8 +126,6 @@ to develop applications that require these. cp -a %{S:1} . %patch0 -p0 %endif -%patch1 -p1 -%patch2 -p1 %build %configure --disable-static --with-pic From ec0f3e594c5d513cdce7527a9b2bb06007d15932d04a134f5b3e5d2d4ceef6aa Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 2 May 2011 11:46:33 +0000 Subject: [PATCH 3/3] Accepting request 69207 from home:vuntz:branches:GNOME:Factory Fix macros, ouch OBS-URL: https://build.opensuse.org/request/show/69207 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/pango?expand=0&rev=64 --- macros.pango | 8 ++++---- pango.changes | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/macros.pango b/macros.pango index 1d7c313..614f461 100644 --- a/macros.pango +++ b/macros.pango @@ -18,9 +18,9 @@ Requires(postun): pango-tools # On install, update the cache %pango_module_post \ %if "%_lib" == "lib64" \ - %{_bindir}/pango-querymodules-64 > %{_sysconfdir}/pango/pango64.immodules \ + %{_bindir}/pango-querymodules-64 > %{_sysconfdir}/pango/pango64.modules \ %else \ - %{_bindir}/pango-querymodules > %{_sysconfdir}/pango/pango.immodules \ + %{_bindir}/pango-querymodules > %{_sysconfdir}/pango/pango.modules \ %endif # On uninstall, update the cache. Note: we ignore upgrades (already @@ -28,8 +28,8 @@ Requires(postun): pango-tools %pango_module_postun \ if [ $1 -eq 0 ]; then \ %if "%_lib" == "lib64" \ - %{_bindir}/pango-querymodules-64 > %{_sysconfdir}/pango/pango64.immodules \ + %{_bindir}/pango-querymodules-64 > %{_sysconfdir}/pango/pango64.modules \ %else \ - %{_bindir}/pango-querymodules > %{_sysconfdir}/pango/pango.immodules \ + %{_bindir}/pango-querymodules > %{_sysconfdir}/pango/pango.modules \ %endif \ fi diff --git a/pango.changes b/pango.changes index c355c56..b6a17e8 100644 --- a/pango.changes +++ b/pango.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 2 12:18:16 CEST 2011 - vuntz@opensuse.org + +- Fix %pango_module_post/%pango_module_postun to create the right + file (pango.modules instead of pango.immodules). + ------------------------------------------------------------------- Tue Apr 5 11:41:02 UTC 2011 - fcrozat@novell.com