Compare commits
No commits in common. "5b1697d8147da3d2dbea1a2759abcf8652012b9f" and "65fc79565cf6bbfd4dc200ba9a1fbe88bbd56fbd" have entirely different histories.
5b1697d814
...
65fc79565c
56
0001-Set-default-LCD-filter-to-FreeType-s-default.patch
Normal file
56
0001-Set-default-LCD-filter-to-FreeType-s-default.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 12a5b7384f35d9a3f4c6b151fac4857444db3d6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nikolaus Waxweiler <madigens@gmail.com>
|
||||||
|
Date: Sat, 10 Nov 2018 16:44:23 +0000
|
||||||
|
Subject: [PATCH] Set default LCD filter to FreeType's default
|
||||||
|
|
||||||
|
---
|
||||||
|
src/cairo-ft-font.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
|
||||||
|
index 325dd61b4..3c47dc12e 100644
|
||||||
|
--- a/src/cairo-ft-font.c
|
||||||
|
+++ b/src/cairo-ft-font.c
|
||||||
|
@@ -1404,7 +1404,7 @@ _render_glyph_outline (FT_Face face,
|
||||||
|
cairo_image_surface_t **surface)
|
||||||
|
{
|
||||||
|
int rgba = FC_RGBA_UNKNOWN;
|
||||||
|
- int lcd_filter = FT_LCD_FILTER_LEGACY;
|
||||||
|
+ int lcd_filter = FT_LCD_FILTER_DEFAULT;
|
||||||
|
FT_GlyphSlot glyphslot = face->glyph;
|
||||||
|
FT_Outline *outline = &glyphslot->outline;
|
||||||
|
FT_Bitmap bitmap;
|
||||||
|
@@ -1439,13 +1439,13 @@ _render_glyph_outline (FT_Face face,
|
||||||
|
case CAIRO_LCD_FILTER_NONE:
|
||||||
|
lcd_filter = FT_LCD_FILTER_NONE;
|
||||||
|
break;
|
||||||
|
- case CAIRO_LCD_FILTER_DEFAULT:
|
||||||
|
case CAIRO_LCD_FILTER_INTRA_PIXEL:
|
||||||
|
lcd_filter = FT_LCD_FILTER_LEGACY;
|
||||||
|
break;
|
||||||
|
case CAIRO_LCD_FILTER_FIR3:
|
||||||
|
lcd_filter = FT_LCD_FILTER_LIGHT;
|
||||||
|
break;
|
||||||
|
+ case CAIRO_LCD_FILTER_DEFAULT:
|
||||||
|
case CAIRO_LCD_FILTER_FIR5:
|
||||||
|
lcd_filter = FT_LCD_FILTER_DEFAULT;
|
||||||
|
break;
|
||||||
|
@@ -3416,7 +3416,6 @@ _cairo_ft_font_options_substitute (const cairo_font_options_t *options,
|
||||||
|
case CAIRO_LCD_FILTER_NONE:
|
||||||
|
lcd_filter = FT_LCD_FILTER_NONE;
|
||||||
|
break;
|
||||||
|
- case CAIRO_LCD_FILTER_DEFAULT:
|
||||||
|
case CAIRO_LCD_FILTER_INTRA_PIXEL:
|
||||||
|
lcd_filter = FT_LCD_FILTER_LEGACY;
|
||||||
|
break;
|
||||||
|
@@ -3424,6 +3423,7 @@ _cairo_ft_font_options_substitute (const cairo_font_options_t *options,
|
||||||
|
lcd_filter = FT_LCD_FILTER_LIGHT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
+ case CAIRO_LCD_FILTER_DEFAULT:
|
||||||
|
case CAIRO_LCD_FILTER_FIR5:
|
||||||
|
lcd_filter = FT_LCD_FILTER_DEFAULT;
|
||||||
|
break;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
14
CVE-2019-6461.patch
Normal file
14
CVE-2019-6461.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
|
||||||
|
index 390397bae..1bde774a4 100644
|
||||||
|
--- a/src/cairo-arc.c
|
||||||
|
+++ b/src/cairo-arc.c
|
||||||
|
@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr,
|
||||||
|
if (cairo_status (cr))
|
||||||
|
return;
|
||||||
|
|
||||||
|
- assert (angle_max >= angle_min);
|
||||||
|
+ if (angle_max < angle_min)
|
||||||
|
+ return;
|
||||||
|
|
||||||
|
if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) {
|
||||||
|
angle_max = fmod (angle_max - angle_min, 2 * M_PI);
|
||||||
13
CVE-2019-6462.patch
Normal file
13
CVE-2019-6462.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
|
||||||
|
index 390397bae..f9249dbeb 100644
|
||||||
|
--- a/src/cairo-arc.c
|
||||||
|
+++ b/src/cairo-arc.c
|
||||||
|
@@ -99,7 +99,7 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
|
||||||
|
do {
|
||||||
|
angle = M_PI / i++;
|
||||||
|
error = _arc_error_normalized (angle);
|
||||||
|
- } while (error > tolerance);
|
||||||
|
+ } while (error > tolerance && error > __DBL_EPSILON__);
|
||||||
|
|
||||||
|
return angle;
|
||||||
|
}
|
||||||
51
backport-CVE-2020-35492.patch
Normal file
51
backport-CVE-2020-35492.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Heiko Lewin <heiko.lewin@worldiety.de>
|
||||||
|
Date: Tue, 15 Dec 2020 16:48:19 +0100
|
||||||
|
Subject: [PATCH] Fix mask usage in image-compositor
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://gitlab.freedesktop.org/cairo/cairo/-/commit/03a820b173ed1fdef6ff14b4468f5dbc02ff59be
|
||||||
|
---
|
||||||
|
src/cairo-image-compositor.c | 8 ++--
|
||||||
|
1 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
|
||||||
|
index 79ad69f68..4f8aaed99 100644
|
||||||
|
--- a/src/cairo-image-compositor.c
|
||||||
|
+++ b/src/cairo-image-compositor.c
|
||||||
|
@@ -2610,14 +2610,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
|
||||||
|
unsigned num_spans)
|
||||||
|
{
|
||||||
|
cairo_image_span_renderer_t *r = abstract_renderer;
|
||||||
|
- uint8_t *m;
|
||||||
|
+ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask);
|
||||||
|
int x0;
|
||||||
|
|
||||||
|
if (num_spans == 0)
|
||||||
|
return CAIRO_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
x0 = spans[0].x;
|
||||||
|
- m = r->_buf;
|
||||||
|
+ m = base;
|
||||||
|
do {
|
||||||
|
int len = spans[1].x - spans[0].x;
|
||||||
|
if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) {
|
||||||
|
@@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
|
||||||
|
spans[0].x, y,
|
||||||
|
spans[1].x - spans[0].x, h);
|
||||||
|
|
||||||
|
- m = r->_buf;
|
||||||
|
+ m = base;
|
||||||
|
x0 = spans[1].x;
|
||||||
|
} else if (spans[0].coverage == 0x0) {
|
||||||
|
if (spans[0].x != x0) {
|
||||||
|
@@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
- m = r->_buf;
|
||||||
|
+ m = base;
|
||||||
|
x0 = spans[1].x;
|
||||||
|
} else {
|
||||||
|
*m++ = spans[0].coverage;
|
||||||
|
|
||||||
Binary file not shown.
81
cairo.spec
81
cairo.spec
@ -1,22 +1,24 @@
|
|||||||
|
%global cairogl --disable-gl
|
||||||
|
|
||||||
Name: cairo
|
Name: cairo
|
||||||
Version: 1.18.0
|
Version: 1.17.4
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: A 2D graphics library
|
Summary: A 2D graphics library
|
||||||
License: LGPLv2 or MPLv1.1
|
License: LGPLv2 or MPLv1.1
|
||||||
URL: http://cairographics.org
|
URL: http://cairographics.org
|
||||||
Source0: http://cairographics.org/snapshots/%{name}-%{version}.tar.xz
|
Source0: http://cairographics.org/napshots/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ gtk-doc meson
|
Patch0001: 0001-Set-default-LCD-filter-to-FreeType-s-default.patch
|
||||||
BuildRequires: pkgconfig(expat)
|
Patch6000: CVE-2019-6461.patch
|
||||||
BuildRequires: pkgconfig(pixman-1) >= 0.36.0
|
Patch6001: CVE-2019-6462.patch
|
||||||
BuildRequires: pkgconfig(freetype2) >= 2.1.9
|
Patch6002: backport-CVE-2020-35492.patch
|
||||||
BuildRequires: pkgconfig(fontconfig) >= 2.2.95
|
|
||||||
BuildRequires: pkgconfig(gobject-2.0)
|
BuildRequires: gcc make
|
||||||
BuildRequires: pkgconfig(libpng)
|
BuildRequires: pkgconfig glib2-devel librsvg2-devel
|
||||||
BuildRequires: pkgconfig(librsvg-2.0)
|
BuildRequires: libXrender-devel libX11-devel libpng-devel libxml2-devel
|
||||||
BuildRequires: pkgconfig(xext)
|
BuildRequires: pixman-devel >= 0.36.0
|
||||||
BuildRequires: pkgconfig(xcb-render)
|
BuildRequires: freetype-devel >= 2.1.9
|
||||||
BuildRequires: pkgconfig(xrender)
|
BuildRequires: fontconfig-devel >= 2.2.95
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Cairo is a 2D graphics libarary with support for multiple output devices.
|
Cairo is a 2D graphics libarary with support for multiple output devices.
|
||||||
@ -59,7 +61,6 @@ needed for developing software which uses the cairo Gobject library.
|
|||||||
|
|
||||||
%package tools
|
%package tools
|
||||||
Summary: Development tools for cairo
|
Summary: Development tools for cairo
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
Cairo is a 2D graphics library designed to provide high-quality display
|
Cairo is a 2D graphics library designed to provide high-quality display
|
||||||
@ -72,29 +73,25 @@ This package contains tools for working with the cairo graphics library.
|
|||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%meson \
|
%configure --disable-static --enable-xlib --enable-ft --enable-ps \
|
||||||
-Dfreetype=enabled \
|
--enable-pdf --enable-svg --enable-tee --enable-gobject \
|
||||||
-Dfontconfig=enabled \
|
%{cairogl} --disable-gtk-doc
|
||||||
-Dglib=enabled \
|
sed -i -e 's/^hardcode_libdir_flag_spec=.*/hardcode_libdir_flag_spec=""/g' \
|
||||||
-Dgtk_doc=true \
|
-e 's/^runpath_var=LD_RUN_PATH/runpath_var=DIE_RPATH_DIE/g' libtool
|
||||||
-Dspectre=disabled \
|
%make_build V=1
|
||||||
-Dsymbol-lookup=disabled \
|
|
||||||
-Dtee=enabled \
|
|
||||||
-Dtests=disabled \
|
|
||||||
-Dxcb=enabled \
|
|
||||||
-Dxlib=enabled
|
|
||||||
%meson_build
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%meson_install
|
%make_install
|
||||||
|
find $RPM_BUILD_ROOT -name '*.la' -delete
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
||||||
%doc AUTHORS BUGS NEWS README.md
|
%doc AUTHORS BIBLIOGRAPHY BUGS NEWS README
|
||||||
%{_libdir}/libcairo.so.2*
|
%{_libdir}/libcairo.so.2*
|
||||||
%{_libdir}/libcairo-script-interpreter.so.2*
|
%{_libdir}/libcairo-script-interpreter.so.2*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
%doc ChangeLog PORTING_GUIDE
|
||||||
%dir %{_includedir}/cairo/
|
%dir %{_includedir}/cairo/
|
||||||
%{_includedir}/cairo/cairo-deprecated.h
|
%{_includedir}/cairo/cairo-deprecated.h
|
||||||
%{_includedir}/cairo/cairo-features.h
|
%{_includedir}/cairo/cairo-features.h
|
||||||
@ -118,7 +115,6 @@ This package contains tools for working with the cairo graphics library.
|
|||||||
%{_libdir}/pkgconfig/cairo-pdf.pc
|
%{_libdir}/pkgconfig/cairo-pdf.pc
|
||||||
%{_libdir}/pkgconfig/cairo-png.pc
|
%{_libdir}/pkgconfig/cairo-png.pc
|
||||||
%{_libdir}/pkgconfig/cairo-ps.pc
|
%{_libdir}/pkgconfig/cairo-ps.pc
|
||||||
%{_libdir}/pkgconfig/cairo-script-interpreter.pc
|
|
||||||
%{_libdir}/pkgconfig/cairo-svg.pc
|
%{_libdir}/pkgconfig/cairo-svg.pc
|
||||||
%{_libdir}/pkgconfig/cairo-tee.pc
|
%{_libdir}/pkgconfig/cairo-tee.pc
|
||||||
%{_libdir}/pkgconfig/cairo-xlib.pc
|
%{_libdir}/pkgconfig/cairo-xlib.pc
|
||||||
@ -141,33 +137,6 @@ This package contains tools for working with the cairo graphics library.
|
|||||||
%{_libdir}/cairo/
|
%{_libdir}/cairo/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 27 2023 Paul Thomas <paulthomas100199@gmail.com> - 1.18.0-1
|
|
||||||
- Type: requirement
|
|
||||||
- ID: NA
|
|
||||||
- SUG: NA
|
|
||||||
- DESC: update to 1.18.0
|
|
||||||
|
|
||||||
* Wed Jul 26 2023 zhangqiumiao<zhangqiumiao1@huawei.com> - 1.17.8-1
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:update to 1.17.8
|
|
||||||
|
|
||||||
* Wed Jun 14 2023 sunhai<sunhai10@huawei.com> - 1.17.4-4
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:cairo_truetype_reverse_cmap detected memory leaks
|
|
||||||
fix read memory access
|
|
||||||
fix call get_unaligned_be32 heap buffer overflow
|
|
||||||
fix heap buffer overflow in cairo_cff_parse_charstring
|
|
||||||
|
|
||||||
* Thu Dec 1 2022 pengyi<pengyi37@huawei.com> - 1.17.4-3
|
|
||||||
- DESC:correct source URL
|
|
||||||
|
|
||||||
* Mon May 09 2022 wangkerong<wangkerong@h-partners.com> - 1.17.4-2
|
|
||||||
- DESC:disable symbol-lookup,fix build failure after install binutils-devel
|
|
||||||
|
|
||||||
* Mon Nov 22 2021 hanhui<hanhui15@huawei.com> - 1.17.4-1
|
* Mon Nov 22 2021 hanhui<hanhui15@huawei.com> - 1.17.4-1
|
||||||
- DESC:update to 1.17.4
|
- DESC:update to 1.17.4
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user