Skip to content

Commit

Permalink
Fix gcc 8 stringop-truncation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann authored and vanosg committed Oct 11, 2018
1 parent 199cf9b commit fb2b648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mod/dns.mod/coredns.c
Expand Up @@ -1053,7 +1053,7 @@ void parserespacket(uint8_t *response, int len)
return;
}
ddebug1(RES_MSG "answered domain is CNAME for: %s", namestring);
strncpy(stackstring, namestring, 1024);
strlcpy(stackstring, namestring, sizeof stackstring);
break;
default:
ddebug2(RES_ERR "Received unimplemented data type: %u (%s)",
Expand Down

0 comments on commit fb2b648

Please sign in to comment.