Date: Mon, 10 Apr 2017 19:22:15 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316685 - head/contrib/elftoolchain/libelf Message-ID: <201704101922.v3AJMFEK001217@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Apr 10 19:22:15 2017 New Revision: 316685 URL: https://svnweb.freebsd.org/changeset/base/316685 Log: libelf: add an assert that msz is non-zero Reported by: Coverity CID: 976023 Modified: head/contrib/elftoolchain/libelf/elf_update.c Modified: head/contrib/elftoolchain/libelf/elf_update.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_update.c Mon Apr 10 18:21:30 2017 (r316684) +++ head/contrib/elftoolchain/libelf/elf_update.c Mon Apr 10 19:22:15 2017 (r316685) @@ -808,6 +808,7 @@ _libelf_write_scn(Elf *e, unsigned char assert(d->d_buf != NULL); assert(d->d_version == e->e_version); + assert(msz != 0); assert(d->d_size % msz == 0); nobjects = (size_t) (d->d_size / msz);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704101922.v3AJMFEK001217>