tor

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

commit 11758260a5ea63c174da20c2f7f988366375c429
parent 9444740f327b0e5b8ce04134a5cef017648f2add
Author: Nick Mathewson <nickm@torproject.org>
Date:   Fri,  7 Nov 2025 14:56:14 -0500

Avoid BUG() in http_connect code when close_without_message is true.

Having the BUG() test first meant that it could be false, and we'd
give an obnoxious bug warning.  Fortunately, OSS-Fuzz caught it.

Bug not in any released version of Tor.

Diffstat:
Msrc/core/or/connection_edge.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c @@ -3241,7 +3241,7 @@ connection_ap_process_http_connect(entry_connection_t *conn) goto done; err: - if (BUG(errmsg == NULL) && ! close_without_message) + if (! close_without_message && BUG(errmsg == NULL)) errmsg = "HTTP/1.0 400 Bad Request\r\n"; if (errmsg) { if (!skip_error_log)