From 615ff95bd1e5cf975d717762f43f3ef272315515 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 12 Jun 2014 10:49:53 +1000 Subject: [PATCH] add INSISTs to silence tainted data false positive in Coverity (cherry picked from commit 83a5c670b82ac019385c787839af4bc20ea06aef) --- lib/dns/rdata/generic/hip_55.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dns/rdata/generic/hip_55.c b/lib/dns/rdata/generic/hip_55.c index 5198497dcb..e69c2685a0 100644 --- a/lib/dns/rdata/generic/hip_55.c +++ b/lib/dns/rdata/generic/hip_55.c @@ -318,6 +318,8 @@ tostruct_hip(ARGS_TOSTRUCT) { goto cleanup; isc_region_consume(®ion, 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;