[sane-devel] [sane-commit] CVS update of sane-backends/frontend (saned.c)

Julien BLACHE jb at jblache.org
Thu Mar 12 21:28:42 UTC 2009


Ilia Sotnikov <hostcc at gmail.com> wrote:

Hi,

> Just as simple as it sounds - if the name lookup with local hostname
> failed, continue to check remote host (assuming that remote host
> address isn't the same as local one) rather then denied access for it.

Reviewing the code, did you actually try the gai+IPv6 code?

Going in a for() loop iterating over res after getaddrinfo() returned
an error doesn't look safe, as I don't remember any guarantee about
the value of res in that case and the doc doesn't mention anything
about that.

In the IPv4 code, you'll end up printing an unrelated error message
"... (only IPv4 is supported)", because the if() you've modified
actually only checks that the returned address is IPv4.

I'm sorry, but I can't call that a good patch, and am reiterating my
request for a revert.

JB.

-- 
Julien BLACHE                                   <http://www.jblache.org> 
<jb at jblache.org>                                  GPG KeyID 0xF5D65169



More information about the sane-devel mailing list