From e011cf38ebae16be83c807b6fe3b1ccafda19228 Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Thu, 16 Apr 2020 13:42:25 -0400 Subject: [PATCH] [WIP] Check VNC buffer allocation. --- src/protocols/vnc/display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/protocols/vnc/display.c b/src/protocols/vnc/display.c index 7273e4b3..97f8f4aa 100644 --- a/src/protocols/vnc/display.c +++ b/src/protocols/vnc/display.c @@ -70,6 +70,8 @@ void guac_vnc_update(rfbClient* client, int x, int y, int w, int h) { /* Init Cairo buffer */ stride = cairo_format_stride_for_width(CAIRO_FORMAT_RGB24, w); buffer = malloc(h*stride); + if (buffer == NULL) + return; buffer_row_current = buffer; bpp = client->format.bitsPerPixel/8;