aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorKaz Wesley <[email protected]>2018-11-14 11:53:27 -0800
committerKaz Wesley <[email protected]>2018-11-15 13:47:53 -0800
commitb7b36decaf878a8c1dcfdb4a27196c730043474b (patch)
tree9550195c8b45644f37f870390c7735a290e8cbf8 /src/httpserver.cpp
parentadd test demonstrating addrLocal UB (diff)
downloaddiscoin-b7b36decaf878a8c1dcfdb4a27196c730043474b.tar.xz
discoin-b7b36decaf878a8c1dcfdb4a27196c730043474b.zip
fix uninitialized read when stringifying an addrLocal
Reachable from either place where SetIP is used when our best-guess addrLocal for a peer is IPv4, but the peer tells us it's reaching us at an IPv6 address. In that case, SetIP turns an IPv4 address into an IPv6 address without setting the scopeId, which is subsequently read in GetSockAddr during CNetAddr::ToStringIP and passed to getnameinfo. Fix by ensuring every constructor initializes the scopeId field with something.
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions