This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] libdw: Fix __libdw_form_val_len endp pointer.
- From: Josh Stone <jistone at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Sat, 13 Dec 2014 14:36:08 -0800
- Subject: 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!