Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: relay_read_http: missing initialisation
To:
Rafael Sadowski <rafael@sizeofvoid.org>
Cc:
tech@openbsd.org
Date:
Thu, 01 Jan 2026 11:48:48 +0100

Download raw body.

Thread
On Thu, 01 Jan 2026 09:47:42 +0100,
Rafael Sadowski <rafael@sizeofvoid.org> wrote:
> 
> It is possible that "request_method" is checked without having been
> initialised in line 439.
> 
> OK?
>

OK kirill@

> 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;
> 

-- 
wbr, Kirill