Merge changes from topics "Ic7ea0f075751f8f077612617802775d2d0a799dc", "Iec02ae89f4a3d2ffe298817240f404e54b109a52" am: 1f2e000c80
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1520659
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I82b606f10035eae94aeb06f41070068ec1ec0ca3
diff --git a/libc/dns/resolv/res_send.c b/libc/dns/resolv/res_send.c
index a645a6b..fa81e6d 100644
--- a/libc/dns/resolv/res_send.c
+++ b/libc/dns/resolv/res_send.c
@@ -948,6 +948,8 @@
else
break;
}
+ // return size should never exceed container size
+ resplen = anssiz;
}
/*
* If the calling applicating has bailed out of
@@ -960,7 +962,7 @@
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;
}