diff options
Diffstat (limited to 'gcc/cppalloc.c')
-rw-r--r-- | gcc/cppalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c index b42e523..47712e7 100644 --- a/gcc/cppalloc.c +++ b/gcc/cppalloc.c @@ -74,8 +74,8 @@ char * xstrdup (input) const char *input; { - unsigned size = strlen (input); - char *output = xmalloc (size + 1); - strcpy (output, input); + size_t size = strlen (input) + 1; + char *output = xmalloc (size); + memcpy (output, input, size); return output; } |