]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disallow creation of TYPE0 records from wire data
authorMark Andrews <marka@isc.org>
Wed, 3 Oct 2001 02:07:34 +0000 (02:07 +0000)
committerMark Andrews <marka@isc.org>
Wed, 3 Oct 2001 02:07:34 +0000 (02:07 +0000)
lib/dns/rdata.c

index 8fbc06feae9a258707d860e1593c2aa4543202bb..8f21b3ffe0c1bb740db6f974230d7772ef5e8acd 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdata.c,v 1.147.2.2 2001/10/03 02:05:25 marka Exp $ */
+/* $Id: rdata.c,v 1.147.2.3 2001/10/03 02:07:34 marka Exp $ */
 
 #include <config.h>
 #include <ctype.h>
@@ -502,6 +502,9 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
                REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
        }
 
+       if (type == 0)
+               return (DNS_R_FORMERR);
+
        ss = *source;
        st = *target;