From: Nick Mathewson Date: Mon, 19 May 2025 00:54:08 +0000 (-0400) Subject: Convince gcc that we will not access an array out of bounds X-Git-Tag: tor-0.4.8.17~8^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbcccc548d51223e23ae7eb6e96d938f911563f0;p=thirdparty%2Ftor.git Convince gcc that we will not access an array out of bounds --- diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c index 61eef5bfa5..b8b8386b78 100644 --- 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];