mirror of
https://github.com/monero-project/kovri
synced 2025-10-06 00:32:51 +02:00
Router ssu session: Fix potential null dereference
Address is checked in GetIntroKey so the chances of running into the new assert are negligible. But Coverity is right, the potential is nonzero. Silences Coverity #183014.
This commit is contained in:
@@ -565,6 +565,7 @@ void SSUSession::SendSessionCreated(const std::uint8_t* dh_x)
|
||||
|
||||
// Compute exchanged session dataset size
|
||||
// TODO(anonimal): at this point, why would we allow mix-and-match IPv6 to send to IPv4 - or vice versa...
|
||||
assert(address);
|
||||
bool const is_IPv6 = address->host.is_v6();
|
||||
std::uint16_t const data_size =
|
||||
get_signed_data_size(alice_ip.size() + (is_IPv6 ? 16 : 4));
|
||||
|
Reference in New Issue
Block a user