[PATCH] libdw: Fix __libdw_form_val_len endp pointer.

Josh Stone jistone at redhat.com
Sat Dec 13 22:36:08 UTC 2014


On 12/12/2014 07:54 AM, Mark Wielaard wrote:
> @@ -513,6 +515,7 @@ __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu,
>        uint8_t len = form_lengths[form];
>        if (len != 0)
>  	{
> +	  const const unsigned char *endp = cu->endp;
>  	  len &= 0x7f; /* Mask to allow 0x80 -> 0.  */
>  	  if (unlikely (len > (size_t) (endp - valp)))
>  	    {

"const const", for when you're *really* sure it won't ever change!


More information about the elfutils-devel mailing list