Fixed overflow detection in chunked parser

This was broken in f405ef11f (1.29.4).

Reported by Matt Suiche, Tolmo Inc.
This commit is contained in:
Sergey Kandaurov 2026-08-06 21:14:27 +04:00 • committed by Sergey Kandaurov
parent f340e7885a
commit e419e28c98

View file

@ -2420,7 +2420,7 @@ data:
ctx->state = state;
b->pos = pos;
if (ctx->size > NGX_MAX_OFF_T_VALUE - 5) {
if (ctx->size > NGX_MAX_OFF_T_VALUE - 9) {
goto invalid;
}