From 219b894de4c366496ffdf3591389de074bfdb2b9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 19 Apr 2012 11:32:04 +0200 Subject: [PATCH] maint: tac: use memcpy, not strcpy * src/tac.c (main): Use memcpy, not strcpy, since we know the length. --- src/tac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.4.GIT