[riot-notifications] [RIOT-OS/RIOT] sock_dns: fix out-of-bound errors (#10740)

Martine Lenders notifications at github.com
Wed Jan 9 22:27:14 CET 2019

miri64 commented on this pull request.

> @@ -129,6 +131,13 @@ static int _parse_dns_reply(uint8_t *buf, size_t len, void* addr_out, int family
             bufpos += addrlen;
+        if (addrlen > SOCK_DNS_MAX_ADDR_LEN) {
+            return -EINVAL;

But since this is supplied to the user and `EINVAL` usually means invalid parameter, a different value might be better.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190109/bd7b67c4/attachment-0001.html>

More information about the notifications mailing list