Thanks for folding in work from the FreeBSD project.

A question about [r3763]:

> libelf: assert that msz is non-zero
>
> Reported by FreeBSD Coverity, CID 976023
>
> Obtained from FreeBSD r316685 by emaste.
>
> Modified Paths:
> --------------
>     trunk/libelf/elf_update.c

> /*
>   * Layout strategy:
> @@ -819,6 +819,7 @@
>   assert(d->d_buf != NULL);
>   assert(d->d_version == e->e_version);
>   assert(d->d_size % msz == 0);
> + assert(msz != 0);
>  
>   nobjects = (size_t) (d->d_size / msz);

The new assertion shouldn't be necessary since the
code a few lines up returns (-1) if 'msz' is zero.

Would this be a Coverity bug, or was FreeBSD's copy
of libelf not sync'ed to Elftoolchain -HEAD prior to
running Coverity's scanner?

Regards,
Joseph Koshy


_______________________________________________
Elftoolchain-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers

Reply via email to