From 9fdf146bd7daa5a4b46b585dd1bb2fef0769ab7e Mon Sep 17 00:00:00 2001 From: Thomas Prip Vestergaard Date: Mon, 2 Jan 2012 19:15:04 +0100 Subject: [PATCH] Bug 710992 - Fix third argument in memcmp call in pixman-image.c; r=roc --- gfx/cairo/README | 2 ++ gfx/cairo/bad-memset.patch | 28 ++++++++++++++++++++++++++ gfx/cairo/libpixman/src/pixman-image.c | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gfx/cairo/bad-memset.patch diff --git a/gfx/cairo/README b/gfx/cairo/README index ab237dfedb3..886d6a9db4a 100644 --- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -186,6 +186,8 @@ NOTE: we previously supported ARM assembler on MSVC, this has been removed becau pixman-export.patch: use cairo_public for PIXMAN_EXPORT to make sure pixman symbols are not exported in libxul +bad-memset.patch: Fix third argument in memcmp call in pixman-image.c + ==== disable printing patch ==== disable-printing.patch: allows us to use NS_PRINTING to disable printing. diff --git a/gfx/cairo/bad-memset.patch b/gfx/cairo/bad-memset.patch new file mode 100644 index 00000000000..89e552625e4 --- /dev/null +++ b/gfx/cairo/bad-memset.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# Parent a968f1430c74282c673c01a2c0a4417e238f2de7 +# User Thomas Prip Vestergaard +Bug 710992 - Fix third argument in memcmp call in pixman-image.c + + +diff --git a/gfx/cairo/libpixman/src/pixman-image.c b/gfx/cairo/libpixman/src/pixman-image.c +--- a/gfx/cairo/libpixman/src/pixman-image.c ++++ b/gfx/cairo/libpixman/src/pixman-image.c +@@ -512,17 +512,17 @@ pixman_image_set_transform (pixman_image + free (common->transform); + common->transform = NULL; + result = TRUE; + + goto out; + } + + if (common->transform && +- memcmp (common->transform, transform, sizeof (pixman_transform_t) == 0)) ++ memcmp (common->transform, transform, sizeof (pixman_transform_t)) == 0) + { + return TRUE; + } + + if (common->transform == NULL) + common->transform = malloc (sizeof (pixman_transform_t)); + + if (common->transform == NULL) diff --git a/gfx/cairo/libpixman/src/pixman-image.c b/gfx/cairo/libpixman/src/pixman-image.c index 26d649d08dd..a5b525c78c7 100644 --- a/gfx/cairo/libpixman/src/pixman-image.c +++ b/gfx/cairo/libpixman/src/pixman-image.c @@ -517,7 +517,7 @@ pixman_image_set_transform (pixman_image_t * image, } if (common->transform && - memcmp (common->transform, transform, sizeof (pixman_transform_t) == 0)) + memcmp (common->transform, transform, sizeof (pixman_transform_t)) == 0) { return TRUE; }