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] gelf_getauxv: Use memcpy instead of pointer dereference to avoid alignment problems.


On 08/25/2013 11:15 PM, Kurt Roeckx wrote:
> -      *dst = ((GElf_auxv_t *) data_scn->d.d_buf)[ndx];
> +      memcpy(dst, (char *)data_scn->d.d_buf + ndx * sizeof(GElf_auxv_t),
> +	     sizeof(GElf_auxv_t));

This looks okay to me now, thanks.

-- 
Florian Weimer / Red Hat Product Security Team

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