cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
Dominique Leuenberger 9c4558f99d Accepting request 1002604 from GNOME:Next
GNOME 43.rc - let's get this into Staging to see what we break (e.g meson:test seems to be an issue already)

OBS-URL: https://build.opensuse.org/request/show/1002604
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/cairo?expand=0&rev=152
2022-09-13 07:31:49 +00:00

14 lines
550 B
Diff

Index: cairo-1.17.6/src/cairo-ft-font.c
===================================================================
--- cairo-1.17.6.orig/src/cairo-ft-font.c
+++ cairo-1.17.6/src/cairo-ft-font.c
@@ -1223,7 +1223,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;