]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add extra return failure after INSIST(0) in default branch
authorOndřej Surý <ondrej@sury.org>
Wed, 24 Oct 2018 14:28:55 +0000 (16:28 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 8 Nov 2018 05:22:17 +0000 (12:22 +0700)
lib/dns/openssleddsa_link.c
lib/dns/rdata/generic/loc_29.c
lib/dns/rdata/in_1/dhcid_49.c

index d19af94395a4c4f31ed884a253ec733660a54861..86b771f2f350fb6badf4e089c735a8c2f3685840 100644 (file)
@@ -570,6 +570,7 @@ openssleddsa_todns(const dst_key_t *key, isc_buffer_t *data) {
        default:
                INSIST(0);
        }
+       return (DST_R_OPENSSLFAILURE);
 }
 
 static isc_result_t
index 7af1c187313a12ef3e85ab191f86fdb5e2617264..388742b8368d8c1d1c0c00213b8cdcaf957eab25 100644 (file)
@@ -551,7 +551,7 @@ totext_loc(ARGS_TOTEXT) {
                altitude -= 10000000;
        }
 
-       snprintf(NULL, 0,
+       snprintf(buf, sizeof(buf),
                 "%d %d %d.%03d %s %d %d %d.%03d %s %s%lu.%02lum %s %s %s",
                 d1, m1, s1, fs1, north ? "N" : "S",
                 d2, m2, s2, fs2, east ? "E" : "W",
index 9fce42d47371150e8cd2edc1364ea557882b3ab9..1f2c30d8834dadb144a04beac6a25357331f0ec3 100644 (file)
@@ -36,7 +36,7 @@ static inline isc_result_t
 totext_in_dhcid(ARGS_TOTEXT) {
        isc_region_t sr, sr2;
        /* " ; 64000 255 64000" */
-       char buf[5 + 3*5 + 1];
+       char buf[5 + 3*11 + 1];
 
        REQUIRE(rdata->type == dns_rdatatype_dhcid);
        REQUIRE(rdata->rdclass == dns_rdataclass_in);
@@ -55,7 +55,7 @@ totext_in_dhcid(ARGS_TOTEXT) {
        if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
                RETERR(str_totext(/* ( */ " )", target));
                if (rdata->length > 2) {
-                       snprintf(NULL, 0, " ; %u %u %u",
+                       snprintf(buf, sizeof(buf), " ; %u %u %u",
                                 sr2.base[0] * 256U + sr2.base[1],
                                 sr2.base[2], rdata->length - 3U);
                        RETERR(str_totext(buf, target));