1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sock_util: Add terminator to host-port string

Add missing null terminator to the returned host-port string in
sock_udp_ep_fmt
This commit is contained in:
Koen Zandberg 2018-07-18 15:18:59 +02:00
parent b8a494fb76
commit d93ecab880
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -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) {