From: Paul Smith Date: Sun, 24 Nov 2013 09:08:30 +0000 (-0500) Subject: * features/loadapi (test_expand): Allocate memory for the nul byte. X-Git-Tag: 4.1~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5f5adb62cd8ea3d96e79b86f9e6fe8ada397b45;p=thirdparty%2Fmake.git * features/loadapi (test_expand): Allocate memory for the nul byte. --- 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; }