]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence gcc-10-fanalyzer false positive
authorMark Andrews <marka@isc.org>
Tue, 18 May 2021 05:51:51 +0000 (15:51 +1000)
committerMark Andrews <marka@isc.org>
Tue, 18 May 2021 06:46:07 +0000 (16:46 +1000)
If 'state == ft_ordinary' then 'label' can't be NULL. Add
INSIST to reflect this.

(cherry picked from commit 29f1c1e67752be1f4bfc91d32443032699ba78ab)

lib/dns/name.c

index 0c610293939e9451551e36897ecbd10549d99b59..9713cf5f4ea9bac881c2fcf67afee8983031fe55 100644 (file)
@@ -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);