aboutsummaryrefslogtreecommitdiff
path: root/libiberty/testsuite/test-expandargv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/testsuite/test-expandargv.c')
-rw-r--r--libiberty/testsuite/test-expandargv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libiberty/testsuite/test-expandargv.c b/libiberty/testsuite/test-expandargv.c
index c16a032..57b96b3 100644
--- a/libiberty/testsuite/test-expandargv.c
+++ b/libiberty/testsuite/test-expandargv.c
@@ -204,7 +204,7 @@ writeout_test (int test, const char * test_data)
if (parse == NULL)
fatal_error (__LINE__, "Failed to malloc parse.", errno);
- memcpy (parse, test_data, sizeof (char) * len);
+ memcpy (parse, test_data, sizeof (char) * (len + 1));
/* Run all possible replaces */
run_replaces (parse);