]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add INSISTs to silence tainted data false positive in Coverity
authorMark Andrews <marka@isc.org>
Thu, 12 Jun 2014 00:49:53 +0000 (10:49 +1000)
committerMark Andrews <marka@isc.org>
Thu, 12 Jun 2014 00:50:19 +0000 (10:50 +1000)
(cherry picked from commit 83a5c670b82ac019385c787839af4bc20ea06aef)

lib/dns/rdata/generic/hip_55.c

index 5198497dcb07824fab5629b554942c2af4675090..e69c2685a01e976d6fb59f9d5c34e82322188486 100644 (file)
@@ -318,6 +318,8 @@ tostruct_hip(ARGS_TOSTRUCT) {
                goto cleanup;
        isc_region_consume(&region, hip->hit_len);
 
+       INSIST(hip->key_len <= region.length);
+
        hip->key = mem_maybedup(mctx, region.base, hip->key_len);
        if (hip->key == NULL)
                goto cleanup;