From: René Scharfe Date: Wed, 1 Oct 2014 10:16:17 +0000 (+0200) Subject: daemon: handle gethostbyname() error X-Git-Tag: v2.1.3~5^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/eb6c403500dd0b0d78b7b00d7ed0bf6b5daccc4e?ds=inline;hp=eb6c403500dd0b0d78b7b00d7ed0bf6b5daccc4e daemon: handle gethostbyname() error If the user-supplied hostname can't be found then we should not use it. We already avoid doing that in the non-NO_IPV6 case by checking if the return value of getaddrinfo() is zero (success). Do the same in the NO_IPV6 case and make sure the return value of gethostbyname() isn't NULL before dereferencing this pointer. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano ---