src/http/modules/ngx_http_rewrite_module.c:720: error: Integer Overflow L2
  ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_http_rewrite_value`.

src/http/modules/ngx_http_rewrite_module.c:705:13: Call
703.         }
704. 
705.         if (ngx_http_rewrite_variable(cf, lcf, &value[cur]) != NGX_CONF_OK) {
                 ^
706.             return NGX_CONF_ERROR;
707.         }

src/http/modules/ngx_http_rewrite_module.c:869:1: Parameter `*value->data`
  867. 
  868. 
  869. static char *
       ^
  870. ngx_http_rewrite_variable(ngx_conf_t *cf, ngx_http_rewrite_loc_conf_t *lcf,
  871.     ngx_str_t *value)

src/http/modules/ngx_http_rewrite_module.c:879:13: Call
  877.     value->data++;
  878. 
  879.     index = ngx_http_get_variable_index(cf, value);
                   ^
  880. 
  881.     if (index == NGX_ERROR) {

src/http/ngx_http_variables.c:429:1: Parameter `*name->data`
    427. 
    428. 
    429. ngx_int_t
         ^
    430. ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name)
    431. {

src/http/modules/ngx_http_rewrite_module.c:720:17: Call
718.         if (len == 1 && p[0] == '=') {
719. 
720.             if (ngx_http_rewrite_value(cf, lcf, &value[last]) != NGX_CONF_OK) {
                     ^
721.                 return NGX_CONF_ERROR;
722.             }

src/http/modules/ngx_http_rewrite_module.c:974:1: Parameter `*value->data`
  972. 
  973. 
  974. static char *
       ^
  975. ngx_http_rewrite_value(ngx_conf_t *cf, ngx_http_rewrite_loc_conf_t *lcf,
  976.     ngx_str_t *value)

src/http/modules/ngx_http_rewrite_module.c:983:9: Call
  981.     ngx_http_script_complex_value_code_t  *complex;
  982. 
  983.     n = ngx_http_script_variables_count(value);
               ^
  984. 
  985.     if (n == 0) {

src/http/ngx_http_script.c:317:1: Parameter `*value->data`
    315. 
    316. 
    317. ngx_uint_t
         ^
    318. ngx_http_script_variables_count(ngx_str_t *value)
    319. {

src/http/modules/ngx_http_rewrite_module.c:992:13: Call
  990.         }
  991. 
  992.         n = ngx_atoi(value->data, value->len);
                   ^
  993. 
  994.         if (n == NGX_ERROR) {

src/core/ngx_string.c:910:5: <LHS trace>
908.     }
909. 
910.     cutoff = NGX_MAX_INT_T_VALUE / 10;
         ^
911.     cutlim = NGX_MAX_INT_T_VALUE % 10;
912. 

src/core/ngx_string.c:910:5: Assignment
    908.     }
    909. 
    910.     cutoff = NGX_MAX_INT_T_VALUE / 10;
             ^
    911.     cutlim = NGX_MAX_INT_T_VALUE % 10;
    912. 

src/core/ngx_string.c:901:1: <RHS trace>
899. 
900. 
901. ngx_int_t
     ^
902. ngx_atoi(u_char *line, size_t n)
903. {

src/core/ngx_string.c:901:1: Parameter `*line`
    899. 
    900. 
    901. ngx_int_t
         ^
    902. ngx_atoi(u_char *line, size_t n)
    903. {

src/core/ngx_string.c:922:9: Binary operation: ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_http_rewrite_value` 
    920.         }
    921. 
    922.         value = value * 10 + (*line - '0');
                 ^
    923.     }
    924. 

ngx_int_t
ngx_atoi(u_char *line, size_t n)
{
    ngx_int_t  value, cutoff, cutlim;
    if (n == 0) {
        return NGX_ERROR;
    }
    cutoff = NGX_MAX_INT_T_VALUE / 10;
    cutlim = NGX_MAX_INT_T_VALUE % 10;
    for (value = 0; n--; line++) {
        if (*line < '0' || *line > '9') {
            return NGX_ERROR;
        }
        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {
            return NGX_ERROR;
        }
        value = value * 10 + (*line - '0');
    }
    return value;
}
['static char *\nngx_http_rewrite_if_condition(ngx_conf_t *cf, ngx_http_rewrite_loc_conf_t *lcf)\n{\n    u_char                        *p;\n    size_t                         len;\n    ngx_str_t                     *value;\n    ngx_uint_t                     cur, last;\n    ngx_regex_compile_t            rc;\n    ngx_http_script_code_pt       *code;\n    ngx_http_script_file_code_t   *fop;\n    ngx_http_script_regex_code_t  *regex;\n    u_char                         errstr[NGX_MAX_CONF_ERRSTR];\n    value = cf->args->elts;\n    last = cf->args->nelts - 1;\n    if (value[1].len < 1 || value[1].data[0] != \'(\') {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid condition \\"%V\\"", &value[1]);\n        return NGX_CONF_ERROR;\n    }\n    if (value[1].len == 1) {\n        cur = 2;\n    } else {\n        cur = 1;\n        value[1].len--;\n        value[1].data++;\n    }\n    if (value[last].len < 1 || value[last].data[value[last].len - 1] != \')\') {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid condition \\"%V\\"", &value[last]);\n        return NGX_CONF_ERROR;\n    }\n    if (value[last].len == 1) {\n        last--;\n    } else {\n        value[last].len--;\n        value[last].data[value[last].len] = \'\\0\';\n    }\n    len = value[cur].len;\n    p = value[cur].data;\n    if (len > 1 && p[0] == \'$\') {\n        if (cur != last && cur + 2 != last) {\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "invalid condition \\"%V\\"", &value[cur]);\n            return NGX_CONF_ERROR;\n        }\n        if (ngx_http_rewrite_variable(cf, lcf, &value[cur]) != NGX_CONF_OK) {\n            return NGX_CONF_ERROR;\n        }\n        if (cur == last) {\n            return NGX_CONF_OK;\n        }\n        cur++;\n        len = value[cur].len;\n        p = value[cur].data;\n        if (len == 1 && p[0] == \'=\') {\n            if (ngx_http_rewrite_value(cf, lcf, &value[last]) != NGX_CONF_OK) {\n                return NGX_CONF_ERROR;\n            }\n            code = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                              sizeof(uintptr_t));\n            if (code == NULL) {\n                return NGX_CONF_ERROR;\n            }\n            *code = ngx_http_script_equal_code;\n            return NGX_CONF_OK;\n        }\n        if (len == 2 && p[0] == \'!\' && p[1] == \'=\') {\n            if (ngx_http_rewrite_value(cf, lcf, &value[last]) != NGX_CONF_OK) {\n                return NGX_CONF_ERROR;\n            }\n            code = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                              sizeof(uintptr_t));\n            if (code == NULL) {\n                return NGX_CONF_ERROR;\n            }\n            *code = ngx_http_script_not_equal_code;\n            return NGX_CONF_OK;\n        }\n        if ((len == 1 && p[0] == \'~\')\n            || (len == 2 && p[0] == \'~\' && p[1] == \'*\')\n            || (len == 2 && p[0] == \'!\' && p[1] == \'~\')\n            || (len == 3 && p[0] == \'!\' && p[1] == \'~\' && p[2] == \'*\'))\n        {\n            regex = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                         sizeof(ngx_http_script_regex_code_t));\n            if (regex == NULL) {\n                return NGX_CONF_ERROR;\n            }\n            ngx_memzero(regex, sizeof(ngx_http_script_regex_code_t));\n            ngx_memzero(&rc, sizeof(ngx_regex_compile_t));\n            rc.pattern = value[last];\n            rc.options = (p[len - 1] == \'*\') ? NGX_REGEX_CASELESS : 0;\n            rc.err.len = NGX_MAX_CONF_ERRSTR;\n            rc.err.data = errstr;\n            regex->regex = ngx_http_regex_compile(cf, &rc);\n            if (regex->regex == NULL) {\n                return NGX_CONF_ERROR;\n            }\n            regex->code = ngx_http_script_regex_start_code;\n            regex->next = sizeof(ngx_http_script_regex_code_t);\n            regex->test = 1;\n            if (p[0] == \'!\') {\n                regex->negative_test = 1;\n            }\n            regex->name = value[last];\n            return NGX_CONF_OK;\n        }\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "unexpected \\"%V\\" in condition", &value[cur]);\n        return NGX_CONF_ERROR;\n    } else if ((len == 2 && p[0] == \'-\')\n               || (len == 3 && p[0] == \'!\' && p[1] == \'-\'))\n    {\n        if (cur + 1 != last) {\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "invalid condition \\"%V\\"", &value[cur]);\n            return NGX_CONF_ERROR;\n        }\n        value[last].data[value[last].len] = \'\\0\';\n        value[last].len++;\n        if (ngx_http_rewrite_value(cf, lcf, &value[last]) != NGX_CONF_OK) {\n            return NGX_CONF_ERROR;\n        }\n        fop = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                          sizeof(ngx_http_script_file_code_t));\n        if (fop == NULL) {\n            return NGX_CONF_ERROR;\n        }\n        fop->code = ngx_http_script_file_code;\n        if (p[1] == \'f\') {\n            fop->op = ngx_http_script_file_plain;\n            return NGX_CONF_OK;\n        }\n        if (p[1] == \'d\') {\n            fop->op = ngx_http_script_file_dir;\n            return NGX_CONF_OK;\n        }\n        if (p[1] == \'e\') {\n            fop->op = ngx_http_script_file_exists;\n            return NGX_CONF_OK;\n        }\n        if (p[1] == \'x\') {\n            fop->op = ngx_http_script_file_exec;\n            return NGX_CONF_OK;\n        }\n        if (p[0] == \'!\') {\n            if (p[2] == \'f\') {\n                fop->op = ngx_http_script_file_not_plain;\n                return NGX_CONF_OK;\n            }\n            if (p[2] == \'d\') {\n                fop->op = ngx_http_script_file_not_dir;\n                return NGX_CONF_OK;\n            }\n            if (p[2] == \'e\') {\n                fop->op = ngx_http_script_file_not_exists;\n                return NGX_CONF_OK;\n            }\n            if (p[2] == \'x\') {\n                fop->op = ngx_http_script_file_not_exec;\n                return NGX_CONF_OK;\n            }\n        }\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid condition \\"%V\\"", &value[cur]);\n        return NGX_CONF_ERROR;\n    }\n    ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                       "invalid condition \\"%V\\"", &value[cur]);\n    return NGX_CONF_ERROR;\n}', 'static char *\nngx_http_rewrite_variable(ngx_conf_t *cf, ngx_http_rewrite_loc_conf_t *lcf,\n    ngx_str_t *value)\n{\n    ngx_int_t                    index;\n    ngx_http_script_var_code_t  *var_code;\n    value->len--;\n    value->data++;\n    index = ngx_http_get_variable_index(cf, value);\n    if (index == NGX_ERROR) {\n        return NGX_CONF_ERROR;\n    }\n    var_code = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                          sizeof(ngx_http_script_var_code_t));\n    if (var_code == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    var_code->code = ngx_http_script_var_code;\n    var_code->index = index;\n    return NGX_CONF_OK;\n}', 'ngx_int_t\nngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name)\n{\n    ngx_uint_t                  i;\n    ngx_http_variable_t        *v;\n    ngx_http_core_main_conf_t  *cmcf;\n    if (name->len == 0) {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid variable name \\"$\\"");\n        return NGX_ERROR;\n    }\n    cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);\n    v = cmcf->variables.elts;\n    if (v == NULL) {\n        if (ngx_array_init(&cmcf->variables, cf->pool, 4,\n                           sizeof(ngx_http_variable_t))\n            != NGX_OK)\n        {\n            return NGX_ERROR;\n        }\n    } else {\n        for (i = 0; i < cmcf->variables.nelts; i++) {\n            if (name->len != v[i].name.len\n                || ngx_strncasecmp(name->data, v[i].name.data, name->len) != 0)\n            {\n                continue;\n            }\n            return i;\n        }\n    }\n    v = ngx_array_push(&cmcf->variables);\n    if (v == NULL) {\n        return NGX_ERROR;\n    }\n    v->name.len = name->len;\n    v->name.data = ngx_pnalloc(cf->pool, name->len);\n    if (v->name.data == NULL) {\n        return NGX_ERROR;\n    }\n    ngx_strlow(v->name.data, name->data, name->len);\n    v->set_handler = NULL;\n    v->get_handler = NULL;\n    v->data = 0;\n    v->flags = 0;\n    v->index = cmcf->variables.nelts - 1;\n    return v->index;\n}', 'static char *\nngx_http_rewrite_value(ngx_conf_t *cf, ngx_http_rewrite_loc_conf_t *lcf,\n    ngx_str_t *value)\n{\n    ngx_int_t                              n;\n    ngx_http_script_compile_t              sc;\n    ngx_http_script_value_code_t          *val;\n    ngx_http_script_complex_value_code_t  *complex;\n    n = ngx_http_script_variables_count(value);\n    if (n == 0) {\n        val = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                         sizeof(ngx_http_script_value_code_t));\n        if (val == NULL) {\n            return NGX_CONF_ERROR;\n        }\n        n = ngx_atoi(value->data, value->len);\n        if (n == NGX_ERROR) {\n            n = 0;\n        }\n        val->code = ngx_http_script_value_code;\n        val->value = (uintptr_t) n;\n        val->text_len = (uintptr_t) value->len;\n        val->text_data = (uintptr_t) value->data;\n        return NGX_CONF_OK;\n    }\n    complex = ngx_http_script_start_code(cf->pool, &lcf->codes,\n                                 sizeof(ngx_http_script_complex_value_code_t));\n    if (complex == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    complex->code = ngx_http_script_complex_value_code;\n    complex->lengths = NULL;\n    ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));\n    sc.cf = cf;\n    sc.source = value;\n    sc.lengths = &complex->lengths;\n    sc.values = &lcf->codes;\n    sc.variables = n;\n    sc.complete_lengths = 1;\n    if (ngx_http_script_compile(&sc) != NGX_OK) {\n        return NGX_CONF_ERROR;\n    }\n    return NGX_CONF_OK;\n}', "ngx_uint_t\nngx_http_script_variables_count(ngx_str_t *value)\n{\n    ngx_uint_t  i, n;\n    for (n = 0, i = 0; i < value->len; i++) {\n        if (value->data[i] == '$') {\n            n++;\n        }\n    }\n    return n;\n}", "ngx_int_t\nngx_atoi(u_char *line, size_t n)\n{\n    ngx_int_t  value, cutoff, cutlim;\n    if (n == 0) {\n        return NGX_ERROR;\n    }\n    cutoff = NGX_MAX_INT_T_VALUE / 10;\n    cutlim = NGX_MAX_INT_T_VALUE % 10;\n    for (value = 0; n--; line++) {\n        if (*line < '0' || *line > '9') {\n            return NGX_ERROR;\n        }\n        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {\n            return NGX_ERROR;\n        }\n        value = value * 10 + (*line - '0');\n    }\n    return value;\n}"]