mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
hs-v3: Fix NULL deref. in hs_circ_service_get_established_intro_circ()
Found by Stem regression tests. Reported by atagar. Fixes #32664 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
65759f2901
commit
3b64c6b6fc
1 changed files with 2 additions and 1 deletions
|
@ -673,7 +673,8 @@ hs_circ_service_get_established_intro_circ(const hs_service_intro_point_t *ip)
|
|||
}
|
||||
|
||||
/* Only return circuit if it is established. */
|
||||
return (TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_INTRO) ? circ : NULL;
|
||||
return (circ && TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_INTRO) ?
|
||||
circ : NULL;
|
||||
}
|
||||
|
||||
/** Called when we fail building a rendezvous circuit at some point other than
|
||||
|
|
Loading…
Add table
Reference in a new issue