Index | Thread | Search

From:
Rafael Sadowski <rafael@sizeofvoid.org>
Subject:
relay_read_http: missing initialisation
To:
tech@openbsd.org
Date:
Thu, 1 Jan 2026 09:47:42 +0100

Download raw body.

Thread
It is possible that "request_method" is checked without having been
initialised in line 439.

OK?

diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c
index b4386966dd5..fa51ec7c319 100644
--- a/usr.sbin/relayd/relay_http.c
+++ b/usr.sbin/relayd/relay_http.c
@@ -195,7 +195,7 @@ relay_read_http(struct bufferevent *bev, void *arg)
 	int			 ws_response = 0;
 	struct http_method_node	*hmn;
 	struct http_session	*hs;
-	enum httpmethod		 request_method;
+	enum httpmethod		 request_method = HTTP_METHOD_NONE;
 
 	getmonotime(&con->se_tv_last);
 	cre->timedout = 0;