commit 76cc7599b28bf942336f2bfa41045f4b2cb2c4db
parent f38e7e401746efb87a3be7df6a7df223fb1eb642
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Thu, 29 Oct 2026 22:46:15 +0100
http_status_str: fixed out-of-band read with wrong HTTP code
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mhd2/http_status_str.c b/src/mhd2/http_status_str.c
@@ -202,7 +202,7 @@ MHD_HTTP_status_code_to_string (enum MHD_HTTP_StatusCode code)
const unsigned int code_i = (unsigned int)code;
if (100 > code_i)
return NULL;
- if (600 < code)
+ if (600 <= code_i)
return NULL;
if (statuses[code_i / 100].num_elmnts <= (code_i % 100))
return NULL;