aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/afb-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afb-socket.c b/src/afb-socket.c
index 63de2cf2..ee3cfbe2 100644
--- a/src/afb-socket.c
+++ b/src/afb-socket.c
@@ -165,7 +165,7 @@ static int open_tcp(const char *spec, int server)
struct addrinfo hint, *rai, *iai;
/* scan the uri */
- tail = strchr(spec, '/');
+ tail = strchrnul(spec, '/');
service = strchr(spec, ':');
if (tail == NULL || service == NULL || tail < service) {
errno = EINVAL;