diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-07-27 08:41:20 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-07-27 08:41:20 +0200 |
commit | 2fb0066b9932f3725a5a0533530453c6da4010ce (patch) | |
tree | dcb2f9ebeac40282d1cc0b00a7279ca324d263fa /src/netaddress.cpp | |
parent | f58674a20a127f104409e11c5c11591533ddf360 (diff) |
net: Add missing verification of IPv6 address in CNetAddr::GetIn6Addr(...)
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r-- | src/netaddress.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 5ccbabd03d..193582d14e 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -300,6 +300,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; } |