summaryrefslogtreecommitdiff
path: root/libc/dns/resolv/res_send.c
diff options
context:
space:
mode:
authorJustin DeMartino <jjdemartino@google.com>2020-09-21 13:23:58 -0700
committerJustin DeMartino <jjdemartino@google.com>2020-09-21 13:23:58 -0700
commit7e4fe6a28b718ab97c08811566238af2893ca65b (patch)
tree5413a5ec890b5a1ac4fbbe4548b5014e41a2591b /libc/dns/resolv/res_send.c
parentdcdcb3fa15004669823a3a118189d9d72ff30852 (diff)
parentab08b955a34423d53b28a6210e7530e67241af4a (diff)
Merge SP1A.200921.001
Change-Id: Id2ab019914bb555dadf52c46b8403c0d5fb3c20a
Diffstat (limited to 'libc/dns/resolv/res_send.c')
-rw-r--r--libc/dns/resolv/res_send.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/dns/resolv/res_send.c b/libc/dns/resolv/res_send.c
index a645a6b4a..fa81e6dc5 100644
--- a/libc/dns/resolv/res_send.c
+++ b/libc/dns/resolv/res_send.c
@@ -948,6 +948,8 @@ send_vc(res_state statp, struct __res_params* params,
else
break;
}
+ // return size should never exceed container size
+ resplen = anssiz;
}
/*
* If the calling applicating has bailed out of
@@ -960,7 +962,7 @@ send_vc(res_state statp, struct __res_params* params,
DprintQ((statp->options & RES_DEBUG) ||
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; old answer (unexpected):\n"),
- ans, (resplen > anssiz) ? anssiz: resplen);
+ ans, resplen);
goto read_len;
}