diff options
author | Jim Meyering <meyering@redhat.com> | 2012-04-16 15:12:02 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-04-16 15:12:02 +0200 |
commit | 31f19d681f91347f0f4b9d4ed148b6aed996bf7e (patch) | |
tree | 5213c2033b5649cf9e563d57e97c8a67008cae71 | |
parent | 4c13a6d743b1c77f4bd87d3de890d9128dc206a2 (diff) | |
download | coreutils-31f19d681f91347f0f4b9d4ed148b6aed996bf7e.tar.xz |
maint: replace a use of strcpy in chmod.c with memcpy
* src/chmod.c (main): Use memcpy rather than strcpy,
since we already have the length handy.
-rw-r--r-- | src/chmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chmod.c b/src/chmod.c index aa4ac771c..a54078c01 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -472,7 +472,7 @@ main (int argc, char **argv) mode = X2REALLOC (mode, &mode_alloc); } mode[mode_len] = ','; - strcpy (mode + mode_comma_len, arg); + memcpy (mode + mode_comma_len, arg, arg_len + 1); mode_len = new_mode_len; diagnose_surprises = true; |