summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2017-08-15 23:19:33 (GMT)
committerIvan Kutepov <its.kutepov@gmail.com>2017-10-03 19:40:38 (GMT)
commit9f3e74b311fb70e562a00f38a9d9a33c67eed607 (patch)
treec501dce712e45b38d74b15e402465a56c0bc2d62
parent2d12e81a0a03bbc2391943348f46d0b7f6fcf0c5 (diff)
downloadandroid_external_dnsmasq-cm-13.0.zip
android_external_dnsmasq-cm-13.0.tar.gz
android_external_dnsmasq-cm-13.0.tar.bz2
Add extra (size_t) cast to avoid compiler warning.HEADreplicant-6.0-0004-rc1replicant-6.0-0003cm-13.0
Bug: 64575136 Test: builds Change-Id: Ia33235230b73cb1a828a65dc3a8d1d396fc37d26 (cherry picked from commit 3b126928a1931ed627d736a8023aed2618b57171) CVE-2017-14496
-rwxr-xr-xsrc/rfc1035.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rfc1035.c b/src/rfc1035.c
index a12c3b0..d13f5bf 100755
--- a/src/rfc1035.c
+++ b/src/rfc1035.c
@@ -1142,7 +1142,7 @@ size_t answer_request(HEADER *header, char *limit, size_t qlen,
struct mx_srv_record *rec;
// Make sure we do not underflow here too.
- if (qlen > (limit - ((char *)header))) return 0;
+ if (qlen > (size_t)(limit - ((char *)header))) return 0;
/* If there is an RFC2671 pseudoheader then it will be overwritten by
partial replies, so we have to do a dry run to see if we can answer