summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-01-06 16:32:39 +0000
committerpfg <pfg@FreeBSD.org>2016-01-06 16:32:39 +0000
commit923d09189e500ed82d2e3f6d161e494a51114eef (patch)
tree1d23e6c21c92eaf3c3d40da5c654ab43da8a1ded /bin
parent7fa53fa83af79e7be87fe75221fbea44dca06262 (diff)
downloadFreeBSD-src-923d09189e500ed82d2e3f6d161e494a51114eef.zip
FreeBSD-src-923d09189e500ed82d2e3f6d161e494a51114eef.tar.gz
MFC r292877:
pax: prevent possible buffer overflow Or at least quiet down some static analyzers about it. CID: 978835 Obtained from: OpenBSD
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/pat_rep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index e8d17db..516519e 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -878,7 +878,7 @@ rep_name(char *name, int *nlen, int prnt)
* (the user already saw that substitution go by)
*/
pt = rephead;
- (void)strcpy(buf1, name);
+ (void)strlcpy(buf1, name, sizeof(buf1));
inpt = buf1;
outpt = nname;
endpt = outpt + PAXPATHLEN;
OpenPOWER on IntegriCloud