Skip to content
Snippets Groups Projects
Unverified Commit 4c183257 authored by Koen Zandberg's avatar Koen Zandberg
Browse files

sock_util: Fix null terminator in sock_udp_ep_fmt

parent 6a81a4d5
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ int sock_udp_ep_fmt(const sock_udp_ep_t *endpoint, char *addr_str, uint16_t *por ...@@ -69,7 +69,7 @@ int sock_udp_ep_fmt(const sock_udp_ep_t *endpoint, char *addr_str, uint16_t *por
char *tmp = addr_str + strlen(addr_str); char *tmp = addr_str + strlen(addr_str);
*tmp++ = '%'; *tmp++ = '%';
tmp += fmt_u16_dec(tmp, endpoint->netif); tmp += fmt_u16_dec(tmp, endpoint->netif);
*tmp = '0'; *tmp = '\0';
#else #else
sprintf(addr_str + strlen(addr_str), "%%%4u", endpoint->netif); sprintf(addr_str + strlen(addr_str), "%%%4u", endpoint->netif);
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment