projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcb9078
)
maint: tac: use memcpy, not strcpy
author
Jim Meyering
<meyering@redhat.com>
Thu, 19 Apr 2012 09:32:04 +0000
(11:32 +0200)
committer
Jim Meyering
<meyering@redhat.com>
Thu, 19 Apr 2012 11:10:36 +0000
(13:10 +0200)
* src/tac.c (main): Use memcpy, not strcpy, since we know the length.
src/tac.c
patch
|
blob
|
history
diff --git
a/src/tac.c
b/src/tac.c
index
b50382d
..
2bf8ad2
100644
(file)
--- 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