SHA256
1
0
forked from pool/cairo
cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
Bjørn Lie 733e01cc36 Accepting request 501654 from home:alarrosa:branches:GNOME:Factory
- Add cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff to
  fix a segfault in get_bitmap_surface due to malformed font
  (bsc#1036789, fdo#100763, CVE-2017-7475).

OBS-URL: https://build.opensuse.org/request/show/501654
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/cairo?expand=0&rev=117
2017-06-07 13:34:23 +00: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;