svn commit: r317722 - stable/11/contrib/elftoolchain/libelf

Ed Maste emaste at FreeBSD.org
Wed May 3 02:37:45 UTC 2017


Author: emaste
Date: Wed May  3 02:37:44 2017
New Revision: 317722
URL: https://svnweb.freebsd.org/changeset/base/317722

Log:
  MFC r316685: libelf: add an assert that msz is non-zero
  
  Reported by:	Coverity
  CID:		976023
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/11/contrib/elftoolchain/libelf/elf_update.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/elftoolchain/libelf/elf_update.c
==============================================================================
--- stable/11/contrib/elftoolchain/libelf/elf_update.c	Wed May  3 02:30:58 2017	(r317721)
+++ stable/11/contrib/elftoolchain/libelf/elf_update.c	Wed May  3 02:37:44 2017	(r317722)
@@ -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);


More information about the svn-src-stable-11 mailing list