Page MenuHomePhabricator

[net/net processing] check banman pointer before dereferencing
ClosedPublic

Authored by Fabien on Jan 5 2021, 16:50.

Details

Summary
Although we currently don't do this, it should be possible to create a
CConnman or PeerLogicValidation without a Banman instance. Therefore
always check that banman exists before dereferencing the pointer.

Also add comments to the m_banman members of CConnman and
PeerLogicValidation to document that these may be nullptr.

Backport of core PR19514.

Depends on D8794.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable