diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-16 08:36:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-16 08:36:34 -0500 |
commit | 6b2e856122c7732b860ce128fcd93d7a71a76fb0 (patch) | |
tree | 9a8dbdc1efa6636438f5fd73bb8303c0326cf610 /src/test | |
parent | a86324d1fa7b8dec8f84d3ab8bd246780b962c92 (diff) | |
download | tor-6b2e856122c7732b860ce128fcd93d7a71a76fb0.tar.gz tor-6b2e856122c7732b860ce128fcd93d7a71a76fb0.zip |
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 (limited to 'src/test')
-rw-r--r-- | src/test/test_hs_intropoint.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c index 6a7962b212..66832087a0 100644 --- 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)); |