]> 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:11:12 +0000 (02:11 +0000)
committerMark Andrews <marka@isc.org>
Wed, 3 Oct 2001 02:11:12 +0000 (02:11 +0000)
lib/dns/rdata.c

index 74d7bd15a4af039fc00e01744276682a36b1d115..c7ac396bbad07e0ed720220de55d91cb690d17f1 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdata.c,v 1.137.2.2 2001/09/21 20:48:06 gson Exp $ */
+/* $Id: rdata.c,v 1.137.2.3 2001/10/03 02:11:12 marka Exp $ */
 
 #include <config.h>
 #include <ctype.h>
@@ -464,6 +464,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;