monero-project / kovri

The Kovri I2P Router Project
Other
571 stars 114 forks source link

SSUSession: get either IPv4/6 intro key from remote #998

Closed anonimal closed 6 years ago

anonimal commented 6 years ago

By submitting this pull-request, I confirm the following:

Resolves #997 (should).

As for the need to throw for all null deference checks, I'll provide a better solution when I return so we don't have to litter the code with throws for every pointer.

anonimal commented 6 years ago

returns a nullptr, a null-dereference can still happen in release builds.

It's not possible because nullptr should never be returned because a transport address will be available (by that point).

Looking forward to your solution for null pointers.

The solution is not for null pointers but for how we assert and throw.