From ff88e33cff0cfbccdfb1ee6cbb643722b6c2d9a4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 18 May 2021 15:51:51 +1000 Subject: [PATCH] Silence gcc-10-fanalyzer false positive If 'state == ft_ordinary' then 'label' can't be NULL. Add INSIST to reflect this. (cherry picked from commit 29f1c1e67752be1f4bfc91d32443032699ba78ab) --- lib/dns/name.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/name.c b/lib/dns/name.c index 0c61029393..9713cf5f4e 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -1280,6 +1280,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source, return (ISC_R_UNEXPECTEDEND); if (state == ft_ordinary) { INSIST(count != 0); + INSIST(label != NULL); *label = count; labels++; INSIST(labels <= 127);