diff --git a/lib/dns/openssleddsa_link.c b/lib/dns/openssleddsa_link.c index d19af94395..86b771f2f3 100644 --- a/lib/dns/openssleddsa_link.c +++ b/lib/dns/openssleddsa_link.c @@ -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 diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index 7af1c18731..388742b836 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -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", diff --git a/lib/dns/rdata/in_1/dhcid_49.c b/lib/dns/rdata/in_1/dhcid_49.c index 9fce42d473..1f2c30d883 100644 --- a/lib/dns/rdata/in_1/dhcid_49.c +++ b/lib/dns/rdata/in_1/dhcid_49.c @@ -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));