Commit 8d0b59a5 authored by Mark Andrews's avatar Mark Andrews

Silence Coverity FORWARD_NULL warning

	CID 1458400 (#1 of 1): Dereference after null check
	(FORWARD_NULL) 14. var_deref_model: Passing null pointer
	nxt->typebits to mem_tobuffer, which dereferences it. [show
	details]

219        return (mem_tobuffer(target, nxt->typebits, nxt->len));
parent eeaffbe0
Pipeline #33632 failed with stages
in 25 minutes and 6 seconds
......@@ -198,12 +198,10 @@ fromstruct_nxt(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_nxt);
REQUIRE(((dns_rdata_nxt_t *)source) != NULL);
REQUIRE(((dns_rdata_nxt_t *)source)->common.rdtype == type);
REQUIRE(((dns_rdata_nxt_t *)source)->common.rdclass == rdclass);
REQUIRE(((dns_rdata_nxt_t *)source)->typebits != NULL ||
((dns_rdata_nxt_t *)source)->len == 0);
nxt = source;
REQUIRE(nxt->common.rdtype == type);
REQUIRE(nxt->common.rdclass == rdclass);
REQUIRE(nxt->typebits != NULL || nxt->len == 0);
if (nxt->typebits != NULL && (nxt->typebits[0] & 0x80) == 0) {
REQUIRE(nxt->len <= 16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment