Accepting request 562571 from GNOME:Next
- Update to version 1.15.10: + Features and Enhancements: - Add support for OpenGL ES 3.0 to the gl backend. - Use Reusable streams for forms in Level 3 Postscript. - Add CAIRO_MIME_TYPE_EPS mime type for embedding EPS files. - Add CCITT_FAX mime type for PDF and PS surfaces. - svg: add a new function to specify the SVG document unit (fdo#90166). - Use UTF-8 filenames on Windows. + API Changes: cairo_svg_surface_set_document_unit() and cairo_svg_surface_get_document_unit(). + Bugs fixed: - Fix regression in gles version detection. - Fix undefined-behavior with integer math. - Handle SOURCE and CLEAR operators when painting color glyphs (fdo#102661). - Convert images to rgba or a8 formats when uploading with GLESv2. - Use _WIN32 instead of windows.h to check for windows build. - Fix sigabrt printing documents with fonts lacking the mandatory .nodef glyph (fdo#102922). - Prevent curved strokes in small ctms from being culled from vector surfaces (fdo#103071). - Fix painting an unbounded recording surface with the SVG backend. - Fix falling back to system font with PDFs using certain embedded fonts, due to truncated font names (fdo#103249). - Fix handling of truetype fonts with excessively long font names (fdo#103249). - Fix race conditions with cairo_mask_compositor_t (fdo#103037). - Fix build error with util/font-view. - Fix assertion hit with PDFs using Type 4 fonts rendered with user fonts, due to error when destroying glyph page (fdo#103335). - Set default creation date for PDFs. - Prevent invalid ptr access for > 4GB images (fdo#98165). - Prevent self-copy infinite loop in Postscript surface. - Fix padded image crash in Postscript surface. - Fix annotation bugs in PDFs and related memory leaks. - Fix test failures and other assorted issues in ps and pdf code. - Fix code generation when using GCC legacy atomic operations (fdo#103559). - Fix various compilation warnings and errors. - Fix various distcheck errors with private symbols, doxygen formatting etc. - Drop cairo-image-prevent-invalid-ptr-access.patch OBS-URL: https://build.opensuse.org/request/show/562571 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/cairo?expand=0&rev=128
This commit is contained in:
parent
6140507c91
commit
c015c8d970
3
cairo-1.15.10.tar.xz
Normal file
3
cairo-1.15.10.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:62ca226134cf2f1fd114bea06f8b374eb37f35d8e22487eaa54d5e9428958392
|
||||
size 41881364
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3224260a4f8e22e7ea95faf706ae111b974833dd74185be1db5ebc7618a98464
|
||||
size 41841808
|
@ -1,122 +0,0 @@
|
||||
From c812d1c1935cccf096a60ad904e640fdc83bd41c Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Johnson <ajohnson@redneon.com>
|
||||
Date: Thu, 20 Oct 2016 21:12:30 +1030
|
||||
Subject: [PATCH] image: prevent invalid ptr access for > 4GB images
|
||||
|
||||
Image data is often accessed using:
|
||||
|
||||
image->data + y * image->stride
|
||||
|
||||
On 64-bit achitectures if the image data is > 4GB, this computation
|
||||
will overflow since both y and stride are 32-bit types.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=98165
|
||||
---
|
||||
boilerplate/cairo-boilerplate.c | 4 +++-
|
||||
src/cairo-image-compositor.c | 4 ++--
|
||||
src/cairo-image-surface-private.h | 2 +-
|
||||
src/cairo-mesh-pattern-rasterizer.c | 2 +-
|
||||
src/cairo-png.c | 2 +-
|
||||
src/cairo-script-surface.c | 3 ++-
|
||||
6 files changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
|
||||
index 7fdbf79..4804dea 100644
|
||||
--- a/boilerplate/cairo-boilerplate.c
|
||||
+++ b/boilerplate/cairo-boilerplate.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#undef CAIRO_VERSION_H
|
||||
#include "../cairo-version.h"
|
||||
|
||||
+#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
@@ -976,7 +977,8 @@ cairo_surface_t *
|
||||
cairo_boilerplate_image_surface_create_from_ppm_stream (FILE *file)
|
||||
{
|
||||
char format;
|
||||
- int width, height, stride;
|
||||
+ int width, height;
|
||||
+ ptrdiff_t stride;
|
||||
int x, y;
|
||||
unsigned char *data;
|
||||
cairo_surface_t *image = NULL;
|
||||
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
|
||||
index 48072f8..3ca0006 100644
|
||||
--- a/src/cairo-image-compositor.c
|
||||
+++ b/src/cairo-image-compositor.c
|
||||
@@ -1575,7 +1575,7 @@ typedef struct _cairo_image_span_renderer {
|
||||
pixman_image_t *src, *mask;
|
||||
union {
|
||||
struct fill {
|
||||
- int stride;
|
||||
+ ptrdiff_t stride;
|
||||
uint8_t *data;
|
||||
uint32_t pixel;
|
||||
} fill;
|
||||
@@ -1594,7 +1594,7 @@ typedef struct _cairo_image_span_renderer {
|
||||
struct finish {
|
||||
cairo_rectangle_int_t extents;
|
||||
int src_x, src_y;
|
||||
- int stride;
|
||||
+ ptrdiff_t stride;
|
||||
uint8_t *data;
|
||||
} mask;
|
||||
} u;
|
||||
diff --git a/src/cairo-image-surface-private.h b/src/cairo-image-surface-private.h
|
||||
index 8ca694c..7e78d61 100644
|
||||
--- a/src/cairo-image-surface-private.h
|
||||
+++ b/src/cairo-image-surface-private.h
|
||||
@@ -71,7 +71,7 @@ struct _cairo_image_surface {
|
||||
|
||||
int width;
|
||||
int height;
|
||||
- int stride;
|
||||
+ ptrdiff_t stride;
|
||||
int depth;
|
||||
|
||||
unsigned owns_data : 1;
|
||||
diff --git a/src/cairo-mesh-pattern-rasterizer.c b/src/cairo-mesh-pattern-rasterizer.c
|
||||
index 1b63ca8..e7f0db6 100644
|
||||
--- a/src/cairo-mesh-pattern-rasterizer.c
|
||||
+++ b/src/cairo-mesh-pattern-rasterizer.c
|
||||
@@ -470,7 +470,7 @@ draw_pixel (unsigned char *data, int width, int height, int stride,
|
||||
tg += tg >> 16;
|
||||
tb += tb >> 16;
|
||||
|
||||
- *((uint32_t*) (data + y*stride + 4*x)) = ((ta << 16) & 0xff000000) |
|
||||
+ *((uint32_t*) (data + y*(ptrdiff_t)stride + 4*x)) = ((ta << 16) & 0xff000000) |
|
||||
((tr >> 8) & 0xff0000) | ((tg >> 16) & 0xff00) | (tb >> 24);
|
||||
}
|
||||
}
|
||||
diff --git a/src/cairo-png.c b/src/cairo-png.c
|
||||
index 562b743..aa8c227 100644
|
||||
--- a/src/cairo-png.c
|
||||
+++ b/src/cairo-png.c
|
||||
@@ -673,7 +673,7 @@ read_png (struct png_read_closure_t *png_closure)
|
||||
}
|
||||
|
||||
for (i = 0; i < png_height; i++)
|
||||
- row_pointers[i] = &data[i * stride];
|
||||
+ row_pointers[i] = &data[i * (ptrdiff_t)stride];
|
||||
|
||||
png_read_image (png, row_pointers);
|
||||
png_read_end (png, info);
|
||||
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
|
||||
index ea0117d..91e4baa 100644
|
||||
--- a/src/cairo-script-surface.c
|
||||
+++ b/src/cairo-script-surface.c
|
||||
@@ -1202,7 +1202,8 @@ static cairo_status_t
|
||||
_write_image_surface (cairo_output_stream_t *output,
|
||||
const cairo_image_surface_t *image)
|
||||
{
|
||||
- int stride, row, width;
|
||||
+ int row, width;
|
||||
+ ptrdiff_t stride;
|
||||
uint8_t row_stack[CAIRO_STACK_BUFFER_SIZE];
|
||||
uint8_t *rowdata;
|
||||
uint8_t *data;
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,3 +1,55 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 18 16:38:19 UTC 2017 - zaitor@opensuse.org
|
||||
|
||||
- Update to version 1.15.10:
|
||||
+ Features and Enhancements:
|
||||
- Add support for OpenGL ES 3.0 to the gl backend.
|
||||
- Use Reusable streams for forms in Level 3 Postscript.
|
||||
- Add CAIRO_MIME_TYPE_EPS mime type for embedding EPS files.
|
||||
- Add CCITT_FAX mime type for PDF and PS surfaces.
|
||||
- svg: add a new function to specify the SVG document unit
|
||||
(fdo#90166).
|
||||
- Use UTF-8 filenames on Windows.
|
||||
+ API Changes: cairo_svg_surface_set_document_unit() and
|
||||
cairo_svg_surface_get_document_unit().
|
||||
+ Bugs fixed:
|
||||
- Fix regression in gles version detection.
|
||||
- Fix undefined-behavior with integer math.
|
||||
- Handle SOURCE and CLEAR operators when painting color glyphs
|
||||
(fdo#102661).
|
||||
- Convert images to rgba or a8 formats when uploading with
|
||||
GLESv2.
|
||||
- Use _WIN32 instead of windows.h to check for windows build.
|
||||
- Fix sigabrt printing documents with fonts lacking the
|
||||
mandatory .nodef glyph (fdo#102922).
|
||||
- Prevent curved strokes in small ctms from being culled from
|
||||
vector surfaces (fdo#103071).
|
||||
- Fix painting an unbounded recording surface with the SVG
|
||||
backend.
|
||||
- Fix falling back to system font with PDFs using certain
|
||||
embedded fonts, due to truncated font names (fdo#103249).
|
||||
- Fix handling of truetype fonts with excessively long font
|
||||
names (fdo#103249).
|
||||
- Fix race conditions with cairo_mask_compositor_t
|
||||
(fdo#103037).
|
||||
- Fix build error with util/font-view.
|
||||
- Fix assertion hit with PDFs using Type 4 fonts rendered with
|
||||
user fonts, due to error when destroying glyph page
|
||||
(fdo#103335).
|
||||
- Set default creation date for PDFs.
|
||||
- Prevent invalid ptr access for > 4GB images (fdo#98165).
|
||||
- Prevent self-copy infinite loop in Postscript surface.
|
||||
- Fix padded image crash in Postscript surface.
|
||||
- Fix annotation bugs in PDFs and related memory leaks.
|
||||
- Fix test failures and other assorted issues in ps and pdf
|
||||
code.
|
||||
- Fix code generation when using GCC legacy atomic operations
|
||||
(fdo#103559).
|
||||
- Fix various compilation warnings and errors.
|
||||
- Fix various distcheck errors with private symbols, doxygen
|
||||
formatting etc.
|
||||
- Drop cairo-image-prevent-invalid-ptr-access.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 12 11:18:44 UTC 2017 - msrb@suse.com
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
%define build_xcb_backend 1
|
||||
%define build_gl_backend 1
|
||||
Name: cairo
|
||||
Version: 1.15.8
|
||||
Version: 1.15.10
|
||||
Release: 0
|
||||
Summary: Vector Graphics Library with Cross-Device Output Support
|
||||
License: LGPL-2.1+ OR MPL-1.1
|
||||
@ -31,8 +31,6 @@ Source99: baselibs.conf
|
||||
Patch0: cairo-xlib-endianness.patch
|
||||
# PATCH-FIX-UPSTREAM cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff alarrosa@suse.com -- Fix segfault in get_bitmap_surface
|
||||
Patch1: cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
|
||||
# PATCH-FIX-UPSTREAM cairo-image-prevent-invalid-ptr-access.patch bsc#1007255 fdo#98165 CVE-2016-9082 alarrosa@suse.com -- Fix segfault when using >4GB images
|
||||
Patch2: cairo-image-prevent-invalid-ptr-access.patch
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
@ -140,7 +138,6 @@ cairo.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
|
Loading…
Reference in New Issue
Block a user