From: Jim Meyering Date: Thu, 19 Apr 2012 09:32:04 +0000 (+0200) Subject: maint: tac: use memcpy, not strcpy X-Git-Tag: v8.17~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=219b894de4c366496ffdf3591389de074bfdb2b9;p=thirdparty%2Fcoreutils.git maint: tac: use memcpy, not strcpy * src/tac.c (main): Use memcpy, not strcpy, since we know the length. --- diff --git a/src/tac.c b/src/tac.c index b50382d425..2bf8ad21dd 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