File gnome171707-backport.patch of Package gdk-pixbuf

Index: io-bmp.c
================================================================================
--- gdk-pixbuf/io-bmp.c
+++ gdk-pixbuf/io-bmp.c
@@ -246,7 +246,14 @@
 static gboolean
 grow_buffer (struct bmp_progressive_state *State)
 {
-  guchar *tmp = realloc (State->buff, State->BufferSize);
+  guchar *tmp;
+
+  if (State->BufferSize == 0) {
+    State->read_state = READ_STATE_ERROR;
+    return FALSE;
+  }
+
+  tmp = realloc (State->buff, State->BufferSize);
   if (!tmp) {
     State->read_state = READ_STATE_ERROR;
     return FALSE;
openSUSE Build Service is sponsored by