Subject: Re: segfault on bad hostname resolve

Re: segfault on bad hostname resolve

From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2005-11-14

On Mon, 14 Nov 2005, Daniel Stenberg wrote:

> I'll run some tests on the machine and see what I find.

And here are the results:

The commit that made the bug appear is this:

   http://cool.haxx.se/cvs.cgi/curl/ares/ares_dns.h.diff?r1=1.2&r2=1.3

It unfortunately assumes that we can write 16 or 32 bits data to the given
address, which is not always the case since the data address might be
unaligned and then it doesn't work on MIPS (for example, it will also fail on
other archs).

While the spirit of the above commit was fine, we need to adjust the original
code to work on big endian hosts, the fix was a bit too naive.

-- 
   c-ares -- my preferred DNS asynch resolver library
Received on Mon Nov 14 00:48:37 2005