Date: Wed, 6 Jan 2016 16:32:40 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293238 - stable/10/bin/pax Message-ID: <201601061632.u06GWe19020531@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Wed Jan 6 16:32:39 2016 New Revision: 293238 URL: https://svnweb.freebsd.org/changeset/base/293238 Log: MFC r292877: pax: prevent possible buffer overflow Or at least quiet down some static analyzers about it. CID: 978835 Obtained from: OpenBSD Modified: stable/10/bin/pax/pat_rep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/pax/pat_rep.c ============================================================================== --- stable/10/bin/pax/pat_rep.c Wed Jan 6 16:27:17 2016 (r293237) +++ stable/10/bin/pax/pat_rep.c Wed Jan 6 16:32:39 2016 (r293238) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601061632.u06GWe19020531>