aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_intropoint.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-16 08:36:34 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-16 08:36:34 -0500
commit6b2e856122c7732b860ce128fcd93d7a71a76fb0 (patch)
tree9a8dbdc1efa6636438f5fd73bb8303c0326cf610 /src/test/test_hs_intropoint.c
parenta86324d1fa7b8dec8f84d3ab8bd246780b962c92 (diff)
downloadtor-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/test_hs_intropoint.c')
-rw-r--r--src/test/test_hs_intropoint.c1
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));