X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/18eacc1185bea956bd9c793ab34e582c08941799..b94ea1bd61485a97c2d0dc2cab4c4d86ffe82e89:/src/src/host.c diff --git a/src/src/host.c b/src/src/host.c index 3e5a88660..ce7ca2bab 100644 --- a/src/src/host.c +++ b/src/src/host.c @@ -2725,6 +2725,7 @@ for (dns_record * rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS); const uschar * s = rr->data; /* MUST be unsigned for GETSHORT */ uschar data[256]; + if (rr_bad_size(rr, sizeof(uint16_t))) continue; GETSHORT(precedence, s); /* Pointer s is advanced */ /* For MX records, we use a random "weight" which causes multiple records of @@ -2737,6 +2738,8 @@ for (dns_record * rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS); /* SRV records are specified with a port and a weight. The weight is used in a special algorithm. However, to start with, we just use it to order the records of equal priority (precedence). */ + + if (rr_bad_increment(rr, s, 2 * sizeof(uint16_t))) continue; GETSHORT(weight, s); GETSHORT(port, s); }