Merge "afb-socket: Relax requirement of tcp ending slash"
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 2 Nov 2018 12:47:36 +0000 (12:47 +0000)
committerGerrit Code Review <gerrit@automotivelinux.org>
Fri, 2 Nov 2018 12:47:36 +0000 (12:47 +0000)
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;