mirror of
https://github.com/nginx/nginx.git
synced 2026-11-17 05:24:10 +00:00
Fixed Priority parsing of large integers on 32-bit platforms
Some checks are pending
buildbot / buildbot (push) Waiting to run
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:
parent
c44e4c6b2d
commit
82f5fd93b9
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue