From: Mark Andrews Date: Thu, 12 Jun 2014 00:42:39 +0000 (+1000) Subject: add INSISTs to silence tainted data false positive in Coverity X-Git-Tag: v9.11.0a1~1548 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=8a2ff13c3dbf43c3a3f0ff8f24d9559ec2d72089;p=thirdparty%2Fbind9.git add INSISTs to silence tainted data false positive in Coverity --- diff --git a/lib/dns/rdata/generic/tkey_249.c b/lib/dns/rdata/generic/tkey_249.c index 6f1ec025388..09175615f63 100644 --- a/lib/dns/rdata/generic/tkey_249.c +++ b/lib/dns/rdata/generic/tkey_249.c @@ -465,6 +465,7 @@ tostruct_tkey(ARGS_TOSTRUCT) { /* * Key. */ + INSIST(tkey->keylen + 2 <= sr.length); tkey->key = mem_maybedup(mctx, sr.base, tkey->keylen); if (tkey->key == NULL) goto cleanup; @@ -479,6 +480,7 @@ tostruct_tkey(ARGS_TOSTRUCT) { /* * Other. */ + INSIST(tkey->otherlen <= sr.length); tkey->other = mem_maybedup(mctx, sr.base, tkey->otherlen); if (tkey->other == NULL) goto cleanup;