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:
parent
21390849bf
commit
a53cbbfa91
@ -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++);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user