mirror of
https://github.com/nginx/nginx.git
synced 2026-10-30 17:10:22 -05:00
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:
1 parent
c44e4c6b2d
commit
82f5fd93b9
1 file changed
+7
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user