From: nishat shabbir Date: Thu, 15 Oct 2026 14:45:37 +0000 (+0530) Subject: Fixed Priority parsing of large integers on 32-bit platforms X-Git-Tag: release-1.31.8~10 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=82f5fd93b99bc3e0fcdb7532ea181a36571d5407;p=nginx.git Fixed Priority parsing of large integers on 32-bit platforms On 32-bit platforms, ngx_atoi() fails on syntactically valid Integers above 2147483647, and the whole Priority field was rejected. Now such values are ignored, similar to Decimals. --- diff --git a/src/http/ngx_http_priority.c b/src/http/ngx_http_priority.c index 91217725b..a3957ec3a 100644 --- a/src/http/ngx_http_priority.c +++ b/src/http/ngx_http_priority.c @@ -521,7 +521,13 @@ ngx_http_priority_parse_number(u_char **pos, u_char *end, ngx_int_t *type, n = ngx_atoi(start, last - start); if (n == NGX_ERROR) { - return NGX_ERROR; + + /* a valid Integer exceeding ngx_int_t: parsed and discarded */ + + *type = NGX_HTTP_PRIORITY_OTHER; + *value = 0; + *pos = last; + return NGX_OK; } *type = NGX_HTTP_PRIORITY_INTEGER;