* features/loadapi (test_expand): Allocate memory for the nul byte.
authorPaul Smith <psmith@gnu.org>
Sun, 24 Nov 2013 09:08:30 +0000 (04:08 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 24 Nov 2013 09:08:30 +0000 (04:08 -0500)
tests/scripts/features/loadapi

index bf66bae85d574ad481c38c301394298f653fda19..8c824c049d84b9ae10c612708df92f278d4bc2f2 100644 (file)
@@ -36,7 +36,7 @@ test_expand (const char *val)
 static char *
 test_noexpand (const char *val)
 {
-    char *str = gmk_alloc (strlen (val));
+    char *str = gmk_alloc (strlen (val) + 1);
     strcpy (str, val);
     return str;
 }