Date: Mon, 28 May 2018 02:31:50 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334268 - head/lib/libc/gen Message-ID: <201805280231.w4S2VoDm074545@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vangyzen Date: Mon May 28 02:31:49 2018 New Revision: 334268 URL: https://svnweb.freebsd.org/changeset/base/334268 Log: fts_stat: fix buffer overrun on error path Reported by: Coverity CID: 1375582 MFC after: 1 week Sponsored by: Dell EMC Modified: head/lib/libc/gen/fts-compat.c Modified: head/lib/libc/gen/fts-compat.c ============================================================================== --- head/lib/libc/gen/fts-compat.c Mon May 28 02:10:35 2018 (r334267) +++ head/lib/libc/gen/fts-compat.c Mon May 28 02:31:49 2018 (r334268) @@ -934,7 +934,7 @@ fts_stat(FTS *sp, FTSENT *p, int follow) } } else if (freebsd11_lstat(p->fts_accpath, sbp)) { p->fts_errno = errno; -err: memset(sbp, 0, sizeof(struct stat)); +err: memset(sbp, 0, sizeof(*sbp)); return (FTS_NS); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805280231.w4S2VoDm074545>