]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
place a upper bound on rdcount
authorMark Andrews <marka@isc.org>
Wed, 4 Jun 2014 03:16:42 +0000 (13:16 +1000)
committerMark Andrews <marka@isc.org>
Wed, 4 Jun 2014 03:16:42 +0000 (13:16 +1000)
lib/dns/master.c

index e6b1a0a80322dec694852c71e06dc82889ba9ff6..a2eef3f2fd2ca16464e09540106eeea5a213e982 100644 (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;
                }