Subject: Re: [PATCH] ares_parse_srv_reply

Re: [PATCH] ares_parse_srv_reply

From: Jakub Hrozek <jhrozek_at_redhat.com>
Date: Tue, 11 Aug 2009 18:21:58 +0200

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

On 08/04/2009 03:48 PM, Jakub Hrozek wrote:
> 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
>

Patch against CVS HEAD attached.

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

iEYEARECAAYFAkqBmqYACgkQHsardTLnvCWe2ACgzhBEjN15P54WpikIKcntQ5zj
aB4An3z0VI88SGLzm5pD/OdzBs/ifh4V
=j1Bz
-----END PGP SIGNATURE-----

Received on 2009-08-11