Skip to content

Commit

Permalink
Merge pull request #954 from pi-hole/fix/gentoo-gcc-10.2.0-r3
Browse files Browse the repository at this point in the history
Tweak code to restore compatibility with Gentoo gcc 10.2.0-r3
  • Loading branch information
DL6ER authored Dec 2, 2020
2 parents d25f05d + 1bc9eb4 commit 239602f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dnsmasq_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,12 @@ bool _FTL_new_query(const unsigned int flags, const char *name,
// 127.0.0.1 to avoid queries originating from localhost of the
// *distant* machine as queries coming from the *local* machine
const sa_family_t family = (flags & F_IPV4) ? AF_INET : AF_INET6;
char clientIP[ADDRSTRLEN] = { 0 };
char clientIP[ADDRSTRLEN+1] = { 0 };
if(config.edns0_ecs && edns->client_set)
{
// Use ECS provided client
strncpy(clientIP, edns->client, ADDRSTRLEN);
clientIP[ADDRSTRLEN-1] = '\0';
clientIP[ADDRSTRLEN] = '\0';
}
else
{
Expand Down

0 comments on commit 239602f

Please sign in to comment.