2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

[master] Fixes minor coverity issues

Merges in rt46836
This commit is contained in:
Thomas Markwalder
2017-12-18 13:50:03 -05:00
parent 1e80a731f0
commit e8b058cfa5
4 changed files with 11 additions and 9 deletions

View File

@@ -1577,7 +1577,7 @@ ddns_fwd_srv_add3(dhcp_ddns_cb_t *ddns_cb,
{
isc_result_t result;
const char *logstr = NULL;
char ddns_address[MAX_ADDRESS_STRING_LEN];
char ddns_address[MAX_ADDRESS_STRING_LEN+1];
#if defined (DEBUG_DNS_UPDATES)
log_info ("DDNS: ddns_fwd_srv_add3: %s eresult: %d",
@@ -1585,7 +1585,9 @@ ddns_fwd_srv_add3(dhcp_ddns_cb_t *ddns_cb,
#endif
/* Construct a printable form of the address for logging */
strcpy(ddns_address, piaddr(ddns_cb->address));
memset(ddns_address, 0x0, sizeof(ddns_address));
strncpy(ddns_address, piaddr(ddns_cb->address),
sizeof(ddns_address) - 1);
switch(eresult) {
case ISC_R_SUCCESS: