Skip to content

Commit

Permalink
Merge pull request #2200 from barton2526/net_fixes
Browse files Browse the repository at this point in the history
net: Add missing verification of IPv6 address in CNetAddr::GetIn6Addr…
  • Loading branch information
jamescowens authored Jun 24, 2021
2 parents 74b360c + 0cb8bfc commit 434e5a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,9 @@ bool CNetAddr::GetInAddr(struct in_addr* pipv4Addr) const

bool CNetAddr::GetIn6Addr(struct in6_addr* pipv6Addr) const
{
if (!IsIPv6()) {
return false;
}
memcpy(pipv6Addr, ip, 16);
return true;
}
Expand Down

0 comments on commit 434e5a6

Please sign in to comment.