diff --git a/lib/dns/rdata/generic/nxt_30.c b/lib/dns/rdata/generic/nxt_30.c index 9d39f22d21..2655861a92 100644 --- a/lib/dns/rdata/generic/nxt_30.c +++ b/lib/dns/rdata/generic/nxt_30.c @@ -148,8 +148,8 @@ fromwire_nxt(ARGS_FROMWIRE) { RETERR(dns_name_fromwire(&name, source, dctx, options, target)); isc_buffer_activeregion(source, &sr); - if (sr.length > 0 && (sr.base[0] & 0x80) == 0 && - ((sr.length > 16) || sr.base[sr.length - 1] == 0)) + if (sr.length > 0 && ((sr.base[0] & 0x80) != 0 || sr.length > 16 || + sr.base[sr.length - 1] == 0)) { return (DNS_R_BADBITMAP); }