Fixed Priority parsing of large integers on 32-bit platforms
Some checks are pending
buildbot / buildbot (push) Waiting to run

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.
This commit is contained in:
nishat shabbir 2026-10-15 20:15:37 +05:30 • committed by Sergey Kandaurov
parent c44e4c6b2d
commit 82f5fd93b9

View file

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