]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TLSA: fix fromwire length checks
authorMark Andrews <marka@isc.org>
Thu, 13 Aug 2020 02:30:04 +0000 (12:30 +1000)
committerMark Andrews <marka@isc.org>
Thu, 13 Aug 2020 13:06:55 +0000 (23:06 +1000)
lib/dns/rdata/generic/tlsa_52.c

index 1140bc01cd9bd74278fce0c77e8ca8a8fe7151a8..5aa6ccac56fb2f10c63a0fde29b33edc0205198d 100644 (file)
@@ -128,7 +128,8 @@ generic_fromwire_tlsa(ARGS_FROMWIRE) {
 
        isc_buffer_activeregion(source, &sr);
 
-       if (sr.length < 3) {
+       /* Usage(1), Selector(1), Type(1), Data(1+) */
+       if (sr.length < 4) {
                return (ISC_R_UNEXPECTEDEND);
        }