tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 6b2e856122c7732b860ce128fcd93d7a71a76fb0
parent a86324d1fa7b8dec8f84d3ab8bd246780b962c92
Author: Nick Mathewson <nickm@torproject.org>
Date:   Tue, 16 Jan 2018 08:36:34 -0500

Fix a (spurious) scan-build warning in test_introduce1_validation()

Since helper_create_introduce1_cell() checks "cell" for nullness,
scan-build is concerned that test_introduce1_validation()
dereferences it without checking it.  So, add a check.

Not backporting, since this is spurious, _and_ tests-only.

Diffstat:
Msrc/test/test_hs_intropoint.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c @@ -725,6 +725,7 @@ test_introduce1_validation(void *arg) /* Create our decoy cell that we'll modify as we go to test the validation * function of that parsed cell. */ cell = helper_create_introduce1_cell(); + tt_assert(cell); /* It should NOT be a legacy cell which will trigger a BUG(). */ memset(cell->legacy_key_id, 'a', sizeof(cell->legacy_key_id));