chiark
/
gitweb
/
~mdw
/
preload-hacks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
67fd355
)
noip.c (present_sockaddr): Handle a null address pointer.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 2 May 2016 21:43:31 +0000
(22:43 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 2 May 2016 23:12:09 +0000
(
00:12
+0100)
We'll want this functionality soon.
noip.c
patch
|
blob
|
blame
|
history
diff --git
a/noip.c
b/noip.c
index 12c9f9ca23de1d99959cc86d0d72622530b9282d..e7f13cd6e1a4d19d45c8b56d263ad6d63285576a 100644
(file)
--- 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 "<null-address>";
if (!sz) return "<no-space-in-buffer>";
if (!len) len = family_socklen(sa->sa_family);