Commit 172d0c40 authored by Michał Kępień's avatar Michał Kępień
Browse files

Address GCC 8 -Wformat-truncation warnings

parent e93a950b
......@@ -13836,7 +13836,8 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
const char *type, *file;
char zonename[DNS_NAME_FORMATSIZE];
isc_uint32_t serial, signed_serial, nodes;
char serbuf[16], sserbuf[16], nodebuf[16], resignbuf[512];
char serbuf[16], sserbuf[16], nodebuf[16];
char resignbuf[DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE + 2];
char lbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
char xbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
char rbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
......
......@@ -776,7 +776,9 @@ dns_dnssec_findzonekeys(dns_db_t *db, dns_dbversion_t *ver,
}
if (result != ISC_R_SUCCESS) {
char filename[ISC_DIR_NAMEMAX];
char filename[DNS_NAME_FORMATSIZE +
DNS_SECALG_FORMATSIZE +
sizeof("key file for //65535")];
isc_result_t result2;
isc_buffer_t buf;
......@@ -1668,7 +1670,9 @@ dns_dnssec_keylistfromrdataset(const dns_name_t *origin,
}
if (result != ISC_R_SUCCESS) {
char filename[ISC_DIR_NAMEMAX];
char filename[DNS_NAME_FORMATSIZE +
DNS_SECALG_FORMATSIZE +
sizeof("key file for //65535")];
isc_result_t result2;
isc_buffer_t buf;
......
......@@ -459,7 +459,7 @@ totext_loc(ARGS_TOTEXT) {
isc_boolean_t below;
isc_region_t sr;
char buf[sizeof("89 59 59.999 N 179 59 59.999 E "
"42849672.95m 90000000m 90000000m 90000000m")];
"-42849672.95m 90000000m 90000000m 90000000m")];
char sbuf[sizeof("90000000m")];
char hbuf[sizeof("90000000m")];
char vbuf[sizeof("90000000m")];
......
......@@ -714,7 +714,7 @@ isc_result_t
isc_file_sanitize(const char *dir, const char *base, const char *ext,
char *path, size_t length)
{
char buf[PATH_MAX], hash[PATH_MAX];
char buf[PATH_MAX], hash[ISC_SHA256_DIGESTSTRINGLENGTH];
size_t l = 0;
REQUIRE(base != NULL);
......
......@@ -785,7 +785,7 @@ isc_result_t
isc_file_sanitize(const char *dir, const char *base, const char *ext,
char *path, size_t length)
{
char buf[PATH_MAX], hash[PATH_MAX];
char buf[PATH_MAX], hash[ISC_SHA256_DIGESTSTRINGLENGTH];
size_t l = 0;
REQUIRE(base != NULL);
......
......@@ -73,7 +73,7 @@ ns_notify_start(ns_client_t *client) {
dns_rdataset_t *zone_rdataset;
dns_zone_t *zone = NULL;
char namebuf[DNS_NAME_FORMATSIZE];
char tsigbuf[DNS_NAME_FORMATSIZE + sizeof(": TSIG ''")];
char tsigbuf[DNS_NAME_FORMATSIZE * 2 + sizeof(": TSIG '' ()")];
dns_tsigkey_t *tsigkey;
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment