]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_8] silence ccc-analyzer
authorEvan Hunt <each@isc.org>
Fri, 3 May 2013 21:23:28 +0000 (14:23 -0700)
committerEvan Hunt <each@isc.org>
Fri, 3 May 2013 21:33:27 +0000 (14:33 -0700)
3567. [bug] Silence clang static analyzer warnings. [RT #33365]

CHANGES
bin/dnssec/dnssec-keygen.c
bin/named/server.c
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index b9bcbb16ad81ddc5e248ddd288ab2f7030f80ab1..98589ff04539f6c1c4eb1b2a5eae95dfb5f456a2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3567.  [bug]           Silence clang static analyzer warnings. [RT #33365]
+
 3563.  [contrib]       zone2sqlite failed with some table names. [RT #33375]
 
 3561.  [bug]           dig: issue a warning if an EDNS query returns FORMERR
index e3dcfdf98256a9471ffd4034c3eeaa90779d9bfa..3d22f997cc2d690b3af408c9f552ff8495e3a6ad 100644 (file)
@@ -526,6 +526,7 @@ main(int argc, char **argv) {
                                        "recommended.\nIf you still wish to "
                                        "use RSA (RSAMD5) please specify "
                                        "\"-a RSAMD5\"\n");
+                       INSIST(freeit == NULL);
                        return (1);
                } else if (strcasecmp(algname, "HMAC-MD5") == 0)
                        alg = DST_ALG_HMACMD5;
index d0ae6f7a81233f0cf98cb5e00bbc4367ea852a32..05c68b992ec444a822fce3c41af2c1e23de289f2 100644 (file)
@@ -5984,6 +5984,7 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep,
        dns_rdataclass_t rdclass;
 
        REQUIRE(zonep != NULL && *zonep == NULL);
+       REQUIRE(zonename == NULL || *zonename == NULL);
 
        input = args;
 
@@ -5996,7 +5997,7 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep,
        zonetxt = next_token(&input, " \t");
        if (zonetxt == NULL)
                return (ISC_R_SUCCESS);
-       if (zonename)
+       if (zonename != NULL)
                *zonename = zonetxt;
 
        /* Look for the optional class name. */
@@ -7657,8 +7658,8 @@ ns_server_del_zone(ns_server_t *server, char *args) {
                goto cleanup;
        }
 
-       if (zonename != NULL)
-               znamelen = strlen(zonename);
+       INSIST(zonename != NULL);
+       znamelen = strlen(zonename);
 
        /* Dig out configuration for this zone */
        view = dns_zone_getview(zone);
index 5f63161f49247c58be28b8f5f04c9f294f7e2202..c212bf68490b65692940feab9b6e49391337bcf8 100644 (file)
@@ -2235,6 +2235,10 @@ isspf(const dns_rdata_t *rdata) {
                data += tl;
                rdl -= tl;
        }
+
+       if (i < 6U)
+               return(ISC_FALSE);
+
        buf[i] = 0;
        if (strncmp(buf, "v=spf1", 6) == 0 && (buf[6] == 0 || buf[6] == ' '))
                return (ISC_TRUE);