File LibVNCServer-CVE-2018-20024.patch of Package LibVNCServer.25862

Index: libvncserver-LibVNCServer-0.9.10/libvncclient/ultra.c
===================================================================
--- libvncserver-LibVNCServer-0.9.10.orig/libvncclient/ultra.c	2014-10-21 17:57:11.000000000 +0200
+++ libvncserver-LibVNCServer-0.9.10/libvncclient/ultra.c	2019-01-03 17:16:03.336767063 +0100
@@ -66,6 +66,8 @@ HandleUltraBPP (rfbClient* client, int r
     if ((client->raw_buffer_size % 4)!=0)
       client->raw_buffer_size += (4-(client->raw_buffer_size % 4));
     client->raw_buffer = (char*) malloc( client->raw_buffer_size );
+    if(client->raw_buffer == NULL)
+      return FALSE;
   }
   
   /* allocate enough space to store the incoming compressed packet */
@@ -150,6 +152,8 @@ HandleUltraZipBPP (rfbClient* client, in
     if ((client->raw_buffer_size % 4)!=0)
       client->raw_buffer_size += (4-(client->raw_buffer_size % 4));
     client->raw_buffer = (char*) malloc( client->raw_buffer_size );
+    if(client->raw_buffer == NULL)
+	return FALSE;
   }
 
  
openSUSE Build Service is sponsored by