From: Mark Wooding Date: Mon, 2 May 2016 21:43:31 +0000 (+0100) Subject: noip.c (present_sockaddr): Handle a null address pointer. X-Git-Tag: 1.2.0~39 X-Git-Url: https://git.distorted.org.uk/~mdw/preload-hacks/commitdiff_plain/ad0f7002c1f3f3cced856ed488bc3eebbadedf07 noip.c (present_sockaddr): Handle a null address pointer. We'll want this functionality soon. --- diff --git a/noip.c b/noip.c index 12c9f9c..e7f13cd 100644 --- a/noip.c +++ b/noip.c @@ -409,6 +409,7 @@ static char *present_sockaddr(const struct sockaddr *sa, socklen_t len, #define WANT(n_) do { if (sz < (n_)) goto nospace; } while (0) #define PUTC(c_) do { *buf++ = (c_); sz--; } while (0) + if (!sa) return ""; if (!sz) return ""; if (!len) len = family_socklen(sa->sa_family);