unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: 33701@debbugs.gnu.org
Subject: [bug#33701] [PATCH staging 09/23] gnu: cairo: Update to 1.16.0.
Date: Tue, 11 Dec 2018 02:14:02 +0100	[thread overview]
Message-ID: <20181211011416.15902-9-mbakke@fastmail.com> (raw)
In-Reply-To: <20181211011416.15902-1-mbakke@fastmail.com>

* gnu/packages/patches/cairo-CVE-2016-9082.patch,
gnu/packages/patches/cairo-setjmp-wrapper.patch: Delete files.
* gnu/local.mk (dist_patch_DATA): Remove them/
* gnu/packages/gtk.scm (cairo): Update to 1.16.0.
[source](patches): Remove.
---
 gnu/local.mk                                  |   2 -
 gnu/packages/gtk.scm                          |   6 +-
 .../patches/cairo-CVE-2016-9082.patch         | 122 ------------------
 .../patches/cairo-setjmp-wrapper.patch        |  78 -----------
 4 files changed, 2 insertions(+), 206 deletions(-)
 delete mode 100644 gnu/packages/patches/cairo-CVE-2016-9082.patch
 delete mode 100644 gnu/packages/patches/cairo-setjmp-wrapper.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6541bcc8be..aaab4c72ec 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -608,8 +608,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/boost-fix-icu-build.patch		\
   %D%/packages/patches/borg-respect-storage-quota.patch		\
   %D%/packages/patches/byobu-writable-status.patch		\
-  %D%/packages/patches/cairo-CVE-2016-9082.patch			\
-  %D%/packages/patches/cairo-setjmp-wrapper.patch		\
   %D%/packages/patches/calibre-no-updates-dialog.patch		\
   %D%/packages/patches/calibre-use-packaged-feedparser.patch	\
   %D%/packages/patches/casync-renameat2-declaration.patch	\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 7a8b6c1852..349d6029c4 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -113,16 +113,14 @@ tools have full access to view and control running applications.")
 (define-public cairo
   (package
    (name "cairo")
-   (version "1.14.12")
+   (version "1.16.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://cairographics.org/releases/cairo-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "05mzyxkvsfc1annjw2dja8vka01ampp9pp93lg09j8hba06g144c"))
-            (patches (search-patches "cairo-CVE-2016-9082.patch"
-                                     "cairo-setjmp-wrapper.patch"))))
+              "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("fontconfig" ,fontconfig)
diff --git a/gnu/packages/patches/cairo-CVE-2016-9082.patch b/gnu/packages/patches/cairo-CVE-2016-9082.patch
deleted file mode 100644
index ad83404194..0000000000
--- a/gnu/packages/patches/cairo-CVE-2016-9082.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-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.
-
-bug report: https://bugs.freedesktop.org/show_bug.cgi?id=98165
-patch: https://bugs.freedesktop.org/attachment.cgi?id=127421
----
- 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
-
diff --git a/gnu/packages/patches/cairo-setjmp-wrapper.patch b/gnu/packages/patches/cairo-setjmp-wrapper.patch
deleted file mode 100644
index bffac6e041..0000000000
--- a/gnu/packages/patches/cairo-setjmp-wrapper.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Revert faulty commit to avoid undefined behaviour:
-https://bugs.freedesktop.org/show_bug.cgi?id=104325
-
-Taken from this upstream commit:
-https://cgit.freedesktop.org/cairo/commit/?h=1.14&id=2acc4382c54bd8239361ceed14423412a343d311
-
-diff --git a/src/cairo-bentley-ottmann-rectangular.c b/src/cairo-bentley-ottmann-rectangular.c
-index cb2e30c..5541bdc 100644
---- a/src/cairo-bentley-ottmann-rectangular.c
-+++ b/src/cairo-bentley-ottmann-rectangular.c
-@@ -593,12 +593,6 @@ sweep_line_insert (sweep_line_t	*sweep, rectangle_t *rectangle)
-     pqueue_push (sweep, rectangle);
- }
- 
--static int
--sweep_line_setjmp (sweep_line_t *sweep_line)
--{
--    return setjmp (sweep_line->unwind);
--}
--
- static cairo_status_t
- _cairo_bentley_ottmann_tessellate_rectangular (rectangle_t	**rectangles,
- 					       int			  num_rectangles,
-@@ -615,7 +609,7 @@ _cairo_bentley_ottmann_tessellate_rectangular (rectangle_t	**rectangles,
- 		     rectangles, num_rectangles,
- 		     fill_rule,
- 		     do_traps, container);
--    if ((status = sweep_line_setjmp (&sweep_line)))
-+    if ((status = setjmp (sweep_line.unwind)))
- 	return status;
- 
-     rectangle = rectangle_pop_start (&sweep_line);
-diff --git a/src/cairo-png.c b/src/cairo-png.c
-index e64b14a..068617d 100644
---- a/src/cairo-png.c
-+++ b/src/cairo-png.c
-@@ -158,14 +158,6 @@ png_simple_warning_callback (png_structp png,
-      */
- }
- 
--static int
--png_setjmp (png_struct *png)
--{
--#ifdef PNG_SETJMP_SUPPORTED
--    return setjmp (png_jmpbuf (png));
--#endif
--    return 0;
--}
- 
- /* Starting with libpng-1.2.30, we must explicitly specify an output_flush_fn.
-  * Otherwise, we will segfault if we are writing to a stream. */
-@@ -237,8 +229,10 @@ write_png (cairo_surface_t	*surface,
- 	goto BAIL4;
-     }
- 
--    if (png_setjmp (png))
-+#ifdef PNG_SETJMP_SUPPORTED
-+    if (setjmp (png_jmpbuf (png)))
- 	goto BAIL4;
-+#endif
- 
-     png_set_write_fn (png, closure, write_func, png_simple_output_flush_fn);
- 
-@@ -577,11 +571,12 @@ read_png (struct png_read_closure_t *png_closure)
-     png_set_read_fn (png, png_closure, stream_read_func);
- 
-     status = CAIRO_STATUS_SUCCESS;
--
--    if (png_setjmp (png)) {
-+#ifdef PNG_SETJMP_SUPPORTED
-+    if (setjmp (png_jmpbuf (png))) {
- 	surface = _cairo_surface_create_in_error (status);
- 	goto BAIL;
-     }
-+#endif
- 
-     png_read_info (png, info);
- 
-- 
2.20.0

  parent reply	other threads:[~2018-12-11  1:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  1:12 [bug#33701] [PATCH staging 00/23] Glib/GTK+ updates Marius Bakke
2018-12-11  1:13 ` [bug#33701] [PATCH staging 01/23] gnu: cups-filters: Update to 1.21.5 Marius Bakke
2018-12-11  1:13   ` [bug#33701] [PATCH staging 02/23] gnu: libjpeg-turbo: Update to 2.0.1 Marius Bakke
2018-12-11  1:13   ` [bug#33701] [PATCH staging 03/23] gnu: harfbuzz: Update to 2.2.0 Marius Bakke
2018-12-11  1:13   ` [bug#33701] [PATCH staging 04/23] gnu: poppler: Update to 0.72.0 Marius Bakke
2018-12-12  1:08     ` Leo Famulari
2018-12-11  1:13   ` [bug#33701] [PATCH staging 05/23] gnu: D-Bus: Update to 1.12.12 Marius Bakke
2018-12-11  1:13   ` [bug#33701] [PATCH staging 06/23] gnu: glib: Remove obsolete variable Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 07/23] gnu: glib: Update to 2.56.3 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 08/23] gnu: pixman: Update to 0.36.0 Marius Bakke
2018-12-11  1:14   ` Marius Bakke [this message]
2018-12-11  1:14   ` [bug#33701] [PATCH staging 10/23] gnu: libqmi: Update to 1.20.2 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 11/23] gnu: curl: Remove replacement for 7.62.0 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 12/23] gnu: ghostscript: Update to 9.26 Marius Bakke
2018-12-12  1:07     ` Leo Famulari
2018-12-11  1:14   ` [bug#33701] [PATCH staging 13/23] gnu: icu4c: Update to 63.1 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 14/23] gnu: tzdata-for-tests: Update to 2018g Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 15/23] gnu: nghttp2: Update to 1.35.1 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 16/23] gnu: nettle: Update to 3.4.1 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 17/23] gnu: cyrus-sasl: Update to 2.1.27 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 18/23] gnu: jansson: Update to 2.12 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 19/23] gnu: GnuTLS: Update to 3.6.5 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 20/23] gnu: libuv: Update to 1.24.0 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 21/23] gnu: CMake: Update to 3.13.1 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 22/23] gnu: meson: Update to 0.49.0 Marius Bakke
2018-12-11  1:14   ` [bug#33701] [PATCH staging 23/23] gnu: glib-networking: Update to 2.59.1 Marius Bakke
2018-12-11 20:42 ` [bug#33701] [PATCH staging 00/23] Glib/GTK+ updates Marius Bakke
2018-12-12  1:05 ` Leo Famulari
2018-12-12 20:57   ` bug#33701: " Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181211011416.15902-9-mbakke@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=33701@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).