tor

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

commit dbcccc548d51223e23ae7eb6e96d938f911563f0
parent adb8a870ed90ac1b3504da65b538683a1bc89d10
Author: Nick Mathewson <nickm@torproject.org>
Date:   Sun, 18 May 2025 20:54:08 -0400

Convince gcc that we will not access an array out of bounds

Diffstat:
Msrc/feature/nodelist/networkstatus.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c @@ -2140,6 +2140,10 @@ networkstatus_set_current_consensus(const char *consensus, } current_md_consensus = c; free_consensus = 0; /* avoid free */ + } else { + tor_assert_nonfatal_unreached(); + result = -2; + goto done; } waiting = &consensus_waiting_for_certs[flav];