changeset 1580:72f809e6eb3c

Add NULL check for growbuf pointer.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 13 May 2018 20:34:29 +0300
parents 4288b21e97b9
children 5aa1c3ec91d5
files tools/lib64gfx.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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)