1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 08:21:18 +01:00

sys/net/sock_util: zero out temporary buffer

Otherwise, the following strncpy() leaves strtol() with a non-terminated
buffer.
This commit is contained in:
Kaspar Schleiser 2021-03-18 14:58:35 +01:00
parent 21390849bf
commit a53cbbfa91

View File

@ -170,7 +170,7 @@ int _parse_netif(sock_udp_ep_t *ep_out, char *netifstart)
{
char *netifend;
size_t netiflen;
char netifbuf[NETIF_STR_LEN + 1];
char netifbuf[NETIF_STR_LEN + 1] = {0};
for (netifend = netifstart; *netifend && *netifend != ']';
netifend++);