diff tools/lib64gfx.c @ 1580:72f809e6eb3c

Add NULL check for growbuf pointer.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 13 May 2018 20:34:29 +0300
parents 86373ac0861a
children 3c9e5962eca6
line wrap: on
line diff
--- a/tools/lib64gfx.c	Sun May 13 10:07:25 2018 +0300
+++ b/tools/lib64gfx.c	Sun May 13 20:34:29 2018 +0300
@@ -1102,7 +1102,7 @@
 {
     int res;
 
-    if (img == NULL || fmt == NULL)
+    if (buf == NULL || img == NULL || fmt == NULL)
         return DMERR_NULLPTR;
 
     if ((fmt->flags & DM_FMT_WR) == 0)