summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-04-19 11:32:04 +0200
committerJim Meyering <meyering@redhat.com>2012-04-19 13:10:36 +0200
commit219b894de4c366496ffdf3591389de074bfdb2b9 (patch)
treec99e19abebaef2761fe4a3eb4a17b525478e5d18
parentbcb9078e380d81be62e8df00c45afc2f57392dc2 (diff)
downloadcoreutils-219b894de4c366496ffdf3591389de074bfdb2b9.tar.xz
maint: tac: use memcpy, not strcpy
* src/tac.c (main): Use memcpy, not strcpy, since we know the length.
-rw-r--r--src/tac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tac.c b/src/tac.c
index b50382d42..2bf8ad21d 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -664,7 +664,7 @@ main (int argc, char **argv)
G_buffer = xmalloc (G_buffer_size);
if (sentinel_length)
{
- strcpy (G_buffer, separator);
+ memcpy (G_buffer, separator, sentinel_length + 1);
G_buffer += sentinel_length;
}
else