changeset 260:ab18ebbb5529

Check for NULL fmt.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 17 Feb 2016 12:59:51 +0200
parents 33652234f162
children f1decaee6157
files th_string.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;