place a upper bound on rdcount

This commit is contained in:
Mark Andrews 2014-06-04 13:16:42 +10:00
parent 38cf49d0ef
commit d2fbb50b98

View file

@ -2375,7 +2375,7 @@ load_raw(dns_loadctx_t *lctx) {
rdatalist.covers = isc_buffer_getuint16(&target);
rdatalist.ttl = isc_buffer_getuint32(&target);
rdcount = isc_buffer_getuint32(&target);
if (rdcount == 0) {
if (rdcount == 0 || rdcount > 0xffff) {
result = ISC_R_RANGE;
goto cleanup;
}