MFC r292877:

pax: prevent possible buffer overflow

Or at least quiet down some static analyzers about it.

CID:	978835
Obtained from:	OpenBSD
This commit is contained in:
pfg 2016-01-06 16:32:39 +00:00
parent 7fa53fa83a
commit 923d09189e

View File

@ -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;