From f5f5adb62cd8ea3d96e79b86f9e6fe8ada397b45 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 24 Nov 2013 04:08:30 -0500 Subject: [PATCH] * features/loadapi (test_expand): Allocate memory for the nul byte. --- tests/scripts/features/loadapi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/features/loadapi b/tests/scripts/features/loadapi index bf66bae8..8c824c04 100644 --- a/tests/scripts/features/loadapi +++ b/tests/scripts/features/loadapi @@ -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; }