mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
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.
This commit is contained in:
parent
a86324d1fa
commit
6b2e856122
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user