cxalloc: fix cx_strdup
authorMarko Kreen <markokr@gmail.com>
Mon, 31 Jan 2011 09:48:33 +0000 (11:48 +0200)
committerMarko Kreen <markokr@gmail.com>
Mon, 31 Jan 2011 09:48:33 +0000 (11:48 +0200)
usual/cxalloc.c

index 40b3e4218d320c220810288b3842907549bd7d9c..94d4921dc202ea1f5d634c3fd2e72ea6fa648ffa 100644 (file)
@@ -76,7 +76,7 @@ void *cx_memdup(CxMem *cx, const void *src, size_t len)
 
 void *cx_strdup(CxMem *cx, const char *s)
 {
-       return cx_memdup(cx, s, strlen(s));
+       return cx_memdup(cx, s, strlen(s) + 1);
 }
 
 /*