diff options
author | bapt <bapt@FreeBSD.org> | 2015-05-05 07:47:36 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-05-05 07:47:36 +0000 |
commit | 642b9f517339f568848ec55757ab4a9465726fe1 (patch) | |
tree | de9b4d06d1ff3781bb995668dafc7550ac96b596 /usr.bin/vgrind | |
parent | a0da5a4be40f23e3c966efc30583844d9fcd5d01 (diff) | |
download | FreeBSD-src-642b9f517339f568848ec55757ab4a9465726fe1.zip FreeBSD-src-642b9f517339f568848ec55757ab4a9465726fe1.tar.gz |
Use strlcpy(3) instead of strcpy(3)
Diffstat (limited to 'usr.bin/vgrind')
-rw-r--r-- | usr.bin/vgrind/vgrindefs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c index bd680a9..7298713 100644 --- a/usr.bin/vgrind/vgrindefs.c +++ b/usr.bin/vgrind/vgrindefs.c @@ -145,7 +145,7 @@ tnchktc(void) /* p now points to beginning of last field */ if (p[0] != 't' || p[1] != 'c') return(1); - strcpy(tcname,p+3); + strlcpy(tcname, p+3, 16); q = tcname; while (q && *q != ':') q++; @@ -163,7 +163,7 @@ tnchktc(void) write(STDERR_FILENO, "Vgrind entry too long\n", 23); q[BUFSIZ - (p-tbuf)] = 0; } - strcpy(p, q+1); + strlcpy(p, q+1, BUFSIZ - (p - holdtbuf)); tbuf = holdtbuf; return(1); } |