afb-socket: Relax requirement of tcp ending slash
[src/app-framework-binder.git] / src / afb-socket.c
index 63de2cf..ee3cfbe 100644 (file)
@@ -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;