[eog/gnome-3-16] EogPrintPreview: Fix possible integer overflow
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog/gnome-3-16] EogPrintPreview: Fix possible integer overflow
- Date: Sun, 14 Feb 2016 18:32:58 +0000 (UTC)
commit ec604eb219c43f9e6f654a1888527e9fb537c9f4
Author: Felix Riemann <friemann gnome org>
Date: Sun Feb 14 19:09:16 2016 +0100
EogPrintPreview: Fix possible integer overflow
Import a fix into code copied from GDK which was susceptible to a possible
integer overflow (cf. CVE-2013-7447). This is practically the corresponding
fix from GDK. The code in eog however should only work with images too small
to trigger this integer overflow.
https://bugzilla.gnome.org/show_bug.cgi?id=762028
src/eog-print-preview.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-print-preview.c b/src/eog-print-preview.c
index 3710dff..57ce39d 100644
--- a/src/eog-print-preview.c
+++ b/src/eog-print-preview.c
@@ -727,7 +727,7 @@ create_surface_from_pixbuf (GdkPixbuf *pixbuf)
format = CAIRO_FORMAT_ARGB32;
cairo_stride = cairo_format_stride_for_width (format, width);
- cairo_pixels = g_malloc (height * cairo_stride);
+ cairo_pixels = g_malloc_n (height, cairo_stride);
surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels,
format,
width, height, cairo_stride);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]