diff th_string.c @ 260:ab18ebbb5529

Check for NULL fmt.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 17 Feb 2016 12:59:51 +0200
parents 855f8dc6f123
children e459a28ee1be
line wrap: on
line diff
--- a/th_string.c	Wed Feb 17 12:36:06 2016 +0200
+++ b/th_string.c	Wed Feb 17 12:59:51 2016 +0200
@@ -453,6 +453,9 @@
     int size = 64;
     char *buf, *tmp;
 
+    if (fmt == NULL)
+        return NULL;
+
     if ((buf = th_malloc(size)) == NULL)
         return NULL;