aboutsummaryrefslogtreecommitdiff
path: root/libiberty/testsuite
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-04-10 19:15:10 +0000
committerDJ Delorie <dj@redhat.com>2011-04-10 19:15:10 +0000
commita55c6f410e2441300484d94d790d7f265c7991b6 (patch)
tree104e2d61d76f51a50fd19b98d3ba96686b61e11f /libiberty/testsuite
parente2ece73c64432d4c43522de5d1a633ca12cc9155 (diff)
downloadgdb-a55c6f410e2441300484d94d790d7f265c7991b6.zip
gdb-a55c6f410e2441300484d94d790d7f265c7991b6.tar.gz
gdb-a55c6f410e2441300484d94d790d7f265c7991b6.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/testsuite')
-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);