diff lib64gfx.c @ 513:486067f39bc1

Add sanity checking.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Nov 2012 16:10:37 +0200
parents 4cdcaeb68b54
children c9b9f912acfb
line wrap: on
line diff
--- a/lib64gfx.c	Mon Nov 19 15:53:16 2012 +0200
+++ b/lib64gfx.c	Mon Nov 19 16:10:37 2012 +0200
@@ -433,6 +433,9 @@
 {
     int i;
 
+    if (buf == NULL || img == NULL || fmt == NULL)
+        return DMERR_NULLPTR;
+
     memset(img, 0, sizeof(*img));
     img->type = fmt->type;