* features/loadapi (test_expand): Allocate memory for the nul byte.
diff --git a/tests/scripts/features/loadapi b/tests/scripts/features/loadapi
index bf66bae..8c824c0 100644
--- a/tests/scripts/features/loadapi
+++ b/tests/scripts/features/loadapi
@@ -36,7 +36,7 @@
 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;
 }