diff --git a/sys/net/sock/sock_util.c b/sys/net/sock/sock_util.c index fbb8c0449d..428de24820 100644 --- a/sys/net/sock/sock_util.c +++ b/sys/net/sock/sock_util.c @@ -133,6 +133,7 @@ int sock_urlsplit(const char *url, char *hostport, char *urlpath) return -EOVERFLOW; } memcpy(hostport, hoststart, hostlen); + *(hostport + hostlen) = '\0'; size_t pathlen = strlen(pathstart); if (pathlen) {