projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dns: check length field in tcp response message
[musl]
/
src
/
network
/
lookup_name.c
diff --git
a/src/network/lookup_name.c
b/src/network/lookup_name.c
index
f268bcd
..
4281482
100644
(file)
--- a/
src/network/lookup_name.c
+++ b/
src/network/lookup_name.c
@@
-179,6
+179,7
@@
static int name_from_dns(struct address buf[static MAXADDRS], char canon[static
for (i=nq-1; i>=0; i--) {
ctx.rrtype = qtypes[i];
+ if (alens[i] > sizeof(abuf[i])) alens[i] = sizeof abuf[i];
__dns_parse(abuf[i], alens[i], dns_parse_callback, &ctx);
}