Subject: Re: [PATCH] ares_parse_srv_reply

Re: [PATCH] ares_parse_srv_reply

From: Jakub Hrozek <jhrozek_at_redhat.com>
Date: Tue, 04 Aug 2009 15:48:21 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/03/2009 01:57 PM, Daniel Stenberg wrote:
>
> Sorry for the delay. I am interested in getting this merged. I'm just
> swamped with work and I need (more) help with c-ares.
>

No problem :-)

> In this version of the patch, won't we risk reading a 16bit word from an
> un-aligned memory address? I can't see how 'aptr' is guranteed to be
> aligned when you do *(uint16_t *) reads from it and that will crash on
> numerous architectures. Or am I wrong?

I think you are right, I did not think about memory alignment. IIRC
using memcpy as I did in the previous iteration should take care of
these issues, right?

I also wrote a short manpage for the parse function as I've noticed that
it was the only one without it. If there are no other concerns I can
resend another patch.

Thank you for the review!
Jakub

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkp4PCUACgkQHsardTLnvCUw9ACgtcsOzLROJ1G8wh+qoh4jlAEt
v80AnRPPf63EeKo0nyb55u68pbspi15U
=GWxy
-----END PGP SIGNATURE-----
Received on 2009-08-04