opt/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
Predrag Ivanovic 7abd542e96 cairo: Patch for CVE-2017-7475 and CVE-2016-9082
Patches added:
- cairo-xlib-endianness.patch -- Fix crash when client and server have different endianness
- cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff -- Fix segfault in get_bitmap_surface
- cairo-fix-off-by-one-check.patch -- Fix off by one check in cairo-image-info.c
- 0001-image-prevent-invalid-ptr-access-for-4GB-images.patch CVE-2016-9082 -- Fix segfault when using >4GB images
2017-07-17 19:53:29 +02:00

14 lines
550 B
Diff

Index: cairo-1.15.4/src/cairo-ft-font.c
===================================================================
--- cairo-1.15.4.orig/src/cairo-ft-font.c
+++ cairo-1.15.4/src/cairo-ft-font.c
@@ -1149,7 +1149,7 @@ _get_bitmap_surface (FT_Bitmap *bi
width = bitmap->width;
height = bitmap->rows;
- if (width == 0 || height == 0) {
+ if (width == 0 || height == 0 || bitmap->buffer == NULL) {
*surface = (cairo_image_surface_t *)
cairo_image_surface_create_for_data (NULL, format, 0, 0, 0);
return (*surface)->base.status;