This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libdw: Fix __libdw_form_val_len endp pointer.


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!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]