diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/cairo/14-image-surface-oob-read.patch | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | gfx/cairo/14-image-surface-oob-read.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gfx/cairo/14-image-surface-oob-read.patch b/gfx/cairo/14-image-surface-oob-read.patch new file mode 100644 index 0000000000..6aa4c1b678 --- /dev/null +++ b/gfx/cairo/14-image-surface-oob-read.patch @@ -0,0 +1,17 @@ +diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c +--- a/gfx/cairo/cairo/src/cairo-quartz-surface.c ++++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c +@@ -873,8 +873,12 @@ static cairo_status_t + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + ++ // The last row of data may have less than stride bytes so make sure we ++ // only copy the minimum amount required from that row. + memcpy (image_data, image_surface->data, +- image_surface->height * image_surface->stride); ++ (image_surface->height - 1) * image_surface->stride + ++ cairo_format_stride_for_width (image_surface->format, ++ image_surface->width)); + *image_out = CairoQuartzCreateCGImage (image_surface->format, + image_surface->width, + image_surface->height, |