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.
This commit is contained in:
nishat shabbir authored and Sergey Kandaurov committed 2026-10-15 19:37:10 +04:00
1 parent c44e4c6b2d
commit 82f5fd93b9
1 file changed
+7 -1
+7 -1
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;