From 1bf2727f5e717ebd8858b6276ab8f26d033d9e49 Mon Sep 17 00:00:00 2001 From: povcfe Date: Wed, 5 Jan 2022 11:11:09 +0000 Subject: [PATCH] [mod_extforward] fix out-of-bounds (OOB) write of 4-byte -1 in --- src/mod_extforward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_extforward.c b/src/mod_extforward.c index 733231fd..8dbdfad9 100644 --- a/src/mod_extforward.c +++ b/src/mod_extforward.c @@ -715,7 +715,7 @@ static handler_t mod_extforward_Forwarded (request_st * const r, plugin_data * c while (s[i] == ' ' || s[i] == '\t') ++i; if (s[i] == ';') { ++i; continue; } if (s[i] == ',') { - if (j >= (int)(sizeof(offsets)/sizeof(int))) break; + if (j >= (int)((sizeof(offsets)/sizeof(int)) - 1)) break; offsets[++j] = -1; /*("offset" separating params from next proxy)*/ ++i; continue; -- 2.25.1