commit
2c2f724e7a
@ -1,34 +0,0 @@
|
||||
From 490f8979a260c16b1df055eab386345da18a2d54 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Wed, 10 Jul 2019 20:26:23 -0400
|
||||
Subject: [PATCH] bidi: Be safer against bad input
|
||||
|
||||
Don't run off the end of an array that we
|
||||
allocated to certain length.
|
||||
|
||||
Closes: https://gitlab.gnome.org/GNOME/pango/issues/342
|
||||
---
|
||||
pango/pango-bidi-type.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pango/pango-bidi-type.c b/pango/pango-bidi-type.c
|
||||
index 3e46b66c..5c02dbbb 100644
|
||||
--- a/pango/pango-bidi-type.c
|
||||
+++ b/pango/pango-bidi-type.c
|
||||
@@ -181,8 +181,11 @@ pango_log2vis_get_embedding_levels (const gchar *text,
|
||||
for (i = 0, p = text; p < text + length; p = g_utf8_next_char(p), i++)
|
||||
{
|
||||
gunichar ch = g_utf8_get_char (p);
|
||||
- FriBidiCharType char_type;
|
||||
- char_type = fribidi_get_bidi_type (ch);
|
||||
+ FriBidiCharType char_type = fribidi_get_bidi_type (ch);
|
||||
+
|
||||
+ if (i == n_chars)
|
||||
+ break;
|
||||
+
|
||||
bidi_types[i] = char_type;
|
||||
ored_types |= char_type;
|
||||
if (FRIBIDI_IS_STRONG (char_type))
|
||||
--
|
||||
2.22.0
|
||||
|
||||
30
disable-layout-test.patch
Normal file
30
disable-layout-test.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From e2d66766171c216052b4d1a112752f6fb5370631 Mon Sep 17 00:00:00 2001
|
||||
From: songnannan <songnannan2@huawei.com>
|
||||
Date: Thu, 16 Apr 2020 21:14:36 +0800
|
||||
Subject: [PATCH] disable layout test
|
||||
|
||||
https://gitlab.gnome.org/GNOME/pango/issues/299
|
||||
|
||||
It comes down to font availability differences on the systems the test
|
||||
are run on, which hard to fix.
|
||||
|
||||
---
|
||||
tests/meson.build | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/tests/meson.build b/tests/meson.build
|
||||
index c617331..a870ccf 100644
|
||||
--- a/tests/meson.build
|
||||
+++ b/tests/meson.build
|
||||
@@ -40,8 +40,6 @@ if cairo_dep.found()
|
||||
[ 'testiter', [ 'testiter.c' ], [ libpangocairo_dep ] ],
|
||||
[ 'test-ellipsize', [ 'test-ellipsize.c' ], [ libpangocairo_dep ] ],
|
||||
[ 'markup-parse', [ 'markup-parse.c' , 'test-common.c' ], [ libpangocairo_dep ] ],
|
||||
- [ 'test-layout', [ 'test-layout.c', 'test-common.c' ], [ libpangocairo_dep ] ],
|
||||
- [ 'test-itemize', [ 'test-itemize.c', 'test-common.c' ], [ libpangocairo_dep ] ],
|
||||
[ 'test-shape', [ 'test-shape.c', 'test-common.c' ], [ libpangocairo_dep ] ],
|
||||
[ 'test-font', [ 'test-font.c' ], [ libpangocairo_dep ] ],
|
||||
[ 'testattributes', [ 'testattributes.c', 'test-common.c' ], [ libpangocairo_dep ] ],
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Binary file not shown.
BIN
pango-1.44.7.tar.xz
Normal file
BIN
pango-1.44.7.tar.xz
Normal file
Binary file not shown.
50
pango.spec
50
pango.spec
@ -1,21 +1,22 @@
|
||||
Name: pango
|
||||
Version: 1.43.0
|
||||
Release: 3
|
||||
Version: 1.44.7
|
||||
Release: 1
|
||||
Summary: A library for layout and rendering of text
|
||||
|
||||
License: LGPLv2+
|
||||
URL: https://pango.gnome.org/
|
||||
Source0: https://ftp.gnome.org/pub/GNOME/sources/pango/1.43/pango-1.43.0.tar.xz
|
||||
Source0: https://ftp.gnome.org/pub/GNOME/sources/pango/1.44/pango-%{version}.tar.xz
|
||||
|
||||
Patch6000: CVE-2019-1010238.patch
|
||||
Patch6000: replace-fallthrough-comments.patch
|
||||
Patch9000: disable-layout-test.patch
|
||||
|
||||
BuildRequires: pkgconfig(cairo) >= 1.12.10 fontconfig >= 2.11.91 pkgconfig(freetype2) >= 2.1.5
|
||||
BuildRequires: pkgconfig(fribidi) >= 1.0 pkgconfig(glib-2.0) >= 2.33.12 pkgconfig(harfbuzz) >= 1.4.2
|
||||
BuildRequires: pkgconfig(cairo) >= 1.12.10 fontconfig >= 2.12.92 pkgconfig(freetype2) >= 2.1.5
|
||||
BuildRequires: pkgconfig(fribidi) >= 1.0 pkgconfig(glib-2.0) >= 2.59.2 pkgconfig(harfbuzz) >= 2.0.0
|
||||
BuildRequires: pkgconfig(xft) >= 2.0.0 pkgconfig(libthai) >= 0.1.9 pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: cairo-gobject-devel gtk-doc meson help2man gcc gcc-c++ libxslt
|
||||
BuildRequires: cairo-gobject-devel gtk-doc meson help2man gcc gcc-c++
|
||||
|
||||
Requires: cairo >= 1.12.10 fontconfig >= 2.11.91 freetype >= 2.1.5 fribidi >= 1.0
|
||||
Requires: glib2 >= 2.33.12 harfbuzz >= 1.4.2 libXft >= 2.0.0 libthai >= 0.1.9
|
||||
Requires: cairo >= 1.12.10 fontconfig >= 2.12.92 freetype >= 2.1.5 fribidi >= 1.0
|
||||
Requires: glib2 >= 2.59.2 harfbuzz >= 2.0.0 libXft >= 2.0.0 libthai >= 0.1.9
|
||||
|
||||
%description
|
||||
Pango is a library for layout and rendering of text, with an emphasis
|
||||
@ -27,9 +28,9 @@ and font handling for GTK+-2.x.
|
||||
%package devel
|
||||
Summary: Development environment for %{name}
|
||||
Requires: %{name} = %{version}-%{release} freetype-devel >= 2.1.5
|
||||
Requires: glib2-devel >= 2.33.12 fontconfig-devel >= 2.11.91 cairo-devel >= 1.12.10
|
||||
Provides: %{name}-tests
|
||||
Obsoletes: %{name}-tests
|
||||
Requires: glib2-devel >= 2.59.2 fontconfig-devel >= 2.12.92 cairo-devel >= 1.12.10
|
||||
Provides: %{name}-tests = %{version}-%{release}
|
||||
Obsoletes: %{name}-tests < %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries header files and tests for
|
||||
@ -41,7 +42,7 @@ the %{name}.
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%meson -Denable_docs=true
|
||||
%meson -Denable_docs=true -Dinstall-tests=true
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
@ -49,13 +50,11 @@ the %{name}.
|
||||
|
||||
test -e %{buildroot}%{_libdir}/libpangoxft-1.0.so
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README.md
|
||||
%license COPYING
|
||||
%{_bindir}/%{name}-list
|
||||
@ -64,6 +63,7 @@ test -e %{buildroot}%{_libdir}/libpangoxft-1.0.so
|
||||
%{_libdir}/girepository-1.0/Pango*-1.0.typelib
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/pango-1.0/pango/*.h
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/pango*.pc
|
||||
@ -72,11 +72,23 @@ test -e %{buildroot}%{_libdir}/libpangoxft-1.0.so
|
||||
%{_libexecdir}/installed-tests/pango/
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc NEWS
|
||||
%doc %{_datadir}/gtk-doc/html/pango
|
||||
%{_mandir}/man1/pango-view.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Jun 15 2020 hanhui <hanhui15@huawei.com> -1.44.7-1
|
||||
- Type:bugfix
|
||||
- Id:NA
|
||||
- SUG:NA
|
||||
- Mainline branch update to 1.44.7
|
||||
|
||||
* Thu Mar 19 2020 hexiujun<hexiujun1@huawei.com> - 1.43.0-4
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:enable test
|
||||
|
||||
* Sat Nov 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.43.0-3
|
||||
- Type:bugfix
|
||||
- Id:NA
|
||||
|
||||
54
replace-fallthrough-comments.patch
Normal file
54
replace-fallthrough-comments.patch
Normal file
@ -0,0 +1,54 @@
|
||||
diff -ruN pango-1.44.7.orig/pango/break.c pango-1.44.7/pango/break.c
|
||||
--- pango-1.44.7.orig/pango/break.c 2020-04-07 13:28:18.558848703 +0200
|
||||
+++ pango-1.44.7/pango/break.c 2020-04-07 14:13:03.555033725 +0200
|
||||
@@ -405,7 +405,7 @@
|
||||
GB_type = GB_Prepend;
|
||||
break;
|
||||
}
|
||||
- /* fall through */
|
||||
+ __attribute__((fallthrough));
|
||||
case G_UNICODE_CONTROL:
|
||||
case G_UNICODE_LINE_SEPARATOR:
|
||||
case G_UNICODE_PARAGRAPH_SEPARATOR:
|
||||
@@ -421,7 +421,7 @@
|
||||
GB_type = GB_ControlCRLF;
|
||||
break;
|
||||
}
|
||||
- /* fall through */
|
||||
+ __attribute__((fallthrough));
|
||||
|
||||
case G_UNICODE_OTHER_LETTER:
|
||||
if (makes_hangul_syllable)
|
||||
@@ -594,7 +594,7 @@
|
||||
case G_UNICODE_CONTROL:
|
||||
if (wc != 0x000D && wc != 0x000A && wc != 0x000B && wc != 0x000C && wc != 0x0085)
|
||||
break;
|
||||
- /* fall through */
|
||||
+ __attribute__((fallthrough));
|
||||
case G_UNICODE_LINE_SEPARATOR:
|
||||
case G_UNICODE_PARAGRAPH_SEPARATOR:
|
||||
WB_type = WB_NewlineCRLF; /* CR, LF, Newline */
|
||||
diff -ruN pango-1.44.7.orig/pango/pango-renderer.c pango-1.44.7/pango/pango-renderer.c
|
||||
--- pango-1.44.7.orig/pango/pango-renderer.c 2020-04-07 13:28:18.568848677 +0200
|
||||
+++ pango-1.44.7/pango/pango-renderer.c 2020-04-07 14:12:53.076064830 +0200
|
||||
@@ -222,7 +222,7 @@
|
||||
rect->y + 2 * rect->height,
|
||||
rect->width,
|
||||
rect->height);
|
||||
- /* Fall through */
|
||||
+ __attribute__((fallthrough));
|
||||
case PANGO_UNDERLINE_SINGLE:
|
||||
case PANGO_UNDERLINE_LOW:
|
||||
pango_renderer_draw_rectangle (renderer,
|
||||
diff -ruN pango-1.44.7.orig/tests/testboundaries_ucd.c pango-1.44.7/tests/testboundaries_ucd.c
|
||||
--- pango-1.44.7.orig/tests/testboundaries_ucd.c 2020-04-07 13:28:18.588848625 +0200
|
||||
+++ pango-1.44.7/tests/testboundaries_ucd.c 2020-04-07 14:16:44.621377237 +0200
|
||||
@@ -104,7 +104,7 @@
|
||||
{
|
||||
case 0x00f7: /* DIVISION SIGN: boundary here */
|
||||
temp_attr.bits |= bits.bits;
|
||||
- /* fall through */
|
||||
+ __attribute__((fallthrough));
|
||||
|
||||
case 0x00d7: /* MULTIPLICATION SIGN: no boundary here */
|
||||
break;
|
||||
Loading…
x
Reference in New Issue
Block a user