On Sunday 25 August 2013 15:40:49 Kurt Roeckx wrote:
> On Sun, Aug 25, 2013 at 09:18:42PM +0200, Florian Weimer wrote:
> > memcpy(dst, data_scn->d.d_buf + ndx * sizeof(GElf_auxv_t),
> > sizeof(GElf_axuv_t));
> 
> d_buf is a void *, and I don't think that has defined behavior either.  It
> should probably be:
> memcpy(dst, (char *)data_scn->d.d_buf + ndx * sizeof(GElf_auxv_t),
> sizeof(GElf_axuv_t));

you're right that adding to a void* is undefined.  but practically speaking, 
glibc requires gcc which has known semantics (the same if you cast it to a 
char*), so i wonder if the cast is necessary.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
elfutils-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/elfutils-devel

Reply via email to