2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Address GCC 8 -Wformat-truncation warnings

This commit is contained in:
Michał Kępień 2018-05-09 08:09:54 +02:00
parent e93a950b70
commit 172d0c401e
6 changed files with 12 additions and 7 deletions

View File

@ -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];

View File

@ -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;

View File

@ -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")];

View File

@ -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);

View File

@ -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);

View File

@ -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;
/*