From ab157ab93e0c5a62927947a8d2b0c1c277e526ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 31 Aug 2022 10:20:34 +0100 Subject: [PATCH] move part of sanitizer patch to the patch that introduced the problem MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I3fdec4dd5ae93187aebb4a17f9fb01f0a536c9cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139094 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- external/cairo/cairo/cairo.RGB24_888.patch | 2 +- external/cairo/cairo/san.patch.0 | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/external/cairo/cairo/cairo.RGB24_888.patch b/external/cairo/cairo/cairo.RGB24_888.patch index 6b2befabcc6c..d4f31c5cb81d 100644 --- a/external/cairo/cairo/cairo.RGB24_888.patch +++ b/external/cairo/cairo/cairo.RGB24_888.patch @@ -36,7 +36,7 @@ diff -ru cairo-1.17.4.orig/src/cairo-image-source.c cairo-1.17.4/src/cairo-image return pixman_image_create_solid_fill (&color); + case CAIRO_FORMAT_RGB24_888: -+ pixel = *(uint32_t *) (image->data + y * image->stride + 3 * x); ++ pixel = (uint32_t)(image->data + y * image->stride + 3 * x)[0] | ((uint32_t)(image->data + y * image->stride + 3 * x)[1] << 8) | ((uint32_t)(image->data + y * image->stride + 3 * x)[2] << 16); + pixel &= 0x00ffffff; /* ignore next pixel bits */ + if (pixel == 0) + return _pixman_black_image (); diff --git a/external/cairo/cairo/san.patch.0 b/external/cairo/cairo/san.patch.0 index 54cf805d5865..aba2c2495e64 100644 --- a/external/cairo/cairo/san.patch.0 +++ b/external/cairo/cairo/san.patch.0 @@ -50,17 +50,6 @@ num_clusters * sizeof (cairo_text_cluster_t)); } else { const cairo_glyph_t *cur_glyph; ---- src/cairo-image-source.c -+++ src/cairo-image-source.c -@@ -509,7 +509,7 @@ - return pixman_image_create_solid_fill (&color); - - case CAIRO_FORMAT_RGB24_888: -- pixel = *(uint32_t *) (image->data + y * image->stride + 3 * x); -+ pixel = (uint32_t)(image->data + y * image->stride + 3 * x)[0] | ((uint32_t)(image->data + y * image->stride + 3 * x)[1] << 8) | ((uint32_t)(image->data + y * image->stride + 3 * x)[2] << 16); - pixel &= 0x00ffffff; /* ignore next pixel bits */ - if (pixel == 0) - return _pixman_black_image (); --- src/cairo-surface.c +++ src/cairo-surface.c @@ -2849,7 +2849,7 @@ -- 2.11.4.GIT