src/http/modules/ngx_http_limit_zone_module.c:434: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned64 by call to `ngx_parse_size`.

src/http/modules/ngx_http_limit_zone_module.c:419:5: Assignment
417.     }
418. 
419.     value[2].len--;
         ^
420.     value[2].data++;
421. 

src/http/modules/ngx_http_limit_zone_module.c:427:18: Call
425.     }
426. 
427.     ctx->index = ngx_http_get_variable_index(cf, &value[2]);
                      ^
428.     if (ctx->index == NGX_ERROR) {
429.         return NGX_CONF_ERROR;

src/http/ngx_http_variables.c:322:1: Parameter `name->len`
  320. 
  321. 
  322. ngx_int_t
       ^
  323. ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name)
  324. {

src/http/modules/ngx_http_limit_zone_module.c:434:9: Call
432.     ctx->var = value[2];
433. 
434.     n = ngx_parse_size(&value[3]);
             ^
435. 
436.     if (n == NGX_ERROR) {

src/core/ngx_parse.c:11:1: <LHS trace>
 9. 
10. 
11. ssize_t
    ^
12. ngx_parse_size(ngx_str_t *line)
13. {

src/core/ngx_parse.c:11:1: Parameter `line->len`
   9. 
  10. 
  11. ssize_t
      ^
  12. ngx_parse_size(ngx_str_t *line)
  13. {

src/core/ngx_parse.c:19:5: Assignment
  17.     ngx_int_t  scale;
  18. 
  19.     len = line->len;
          ^
  20.     unit = line->data[len - 1];
  21. 

src/core/ngx_parse.c:20:12: Binary operation: ([0, +oo] - 1):unsigned64 by call to `ngx_parse_size` 
  18. 
  19.     len = line->len;
  20.     unit = line->data[len - 1];
                 ^
  21. 
  22.     switch (unit) {

ssize_t
ngx_parse_size(ngx_str_t *line)
{
    u_char     unit;
    size_t     len;
    ssize_t    size;
    ngx_int_t  scale;
    len = line->len;
    unit = line->data[len - 1];
    switch (unit) {
    case 'K':
    case 'k':
        len--;
        scale = 1024;
        break;
    case 'M':
    case 'm':
        len--;
        scale = 1024 * 1024;
        break;
    default:
        scale = 1;
    }
    size = ngx_atosz(line->data, len);
    if (size == NGX_ERROR) {
        return NGX_ERROR;
    }
    size *= scale;
    return size;
}
['static char *\nngx_http_limit_zone(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)\n{\n    ssize_t                     n;\n    ngx_str_t                  *value;\n    ngx_shm_zone_t             *shm_zone;\n    ngx_http_limit_zone_ctx_t  *ctx;\n    value = cf->args->elts;\n    if (value[2].data[0] != \'$\') {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid variable name \\"%V\\"", &value[2]);\n        return NGX_CONF_ERROR;\n    }\n    value[2].len--;\n    value[2].data++;\n    ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_zone_ctx_t));\n    if (ctx == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    ctx->index = ngx_http_get_variable_index(cf, &value[2]);\n    if (ctx->index == NGX_ERROR) {\n        return NGX_CONF_ERROR;\n    }\n    ctx->var = value[2];\n    n = ngx_parse_size(&value[3]);\n    if (n == NGX_ERROR) {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid size of limit_zone \\"%V\\"", &value[3]);\n        return NGX_CONF_ERROR;\n    }\n    if (n < (ngx_int_t) (8 * ngx_pagesize)) {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "limit_zone \\"%V\\" is too small", &value[1]);\n        return NGX_CONF_ERROR;\n    }\n    shm_zone = ngx_shared_memory_add(cf, &value[1], n,\n                                     &ngx_http_limit_zone_module);\n    if (shm_zone == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    if (shm_zone->data) {\n        ctx = shm_zone->data;\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                        "limit_zone \\"%V\\" is already bound to variable \\"%V\\"",\n                        &value[1], &ctx->var);\n        return NGX_CONF_ERROR;\n    }\n    shm_zone->init = ngx_http_limit_zone_init_zone;\n    shm_zone->data = ctx;\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    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 cmcf->variables.nelts - 1;\n}', "ssize_t\nngx_parse_size(ngx_str_t *line)\n{\n    u_char     unit;\n    size_t     len;\n    ssize_t    size;\n    ngx_int_t  scale;\n    len = line->len;\n    unit = line->data[len - 1];\n    switch (unit) {\n    case 'K':\n    case 'k':\n        len--;\n        scale = 1024;\n        break;\n    case 'M':\n    case 'm':\n        len--;\n        scale = 1024 * 1024;\n        break;\n    default:\n        scale = 1;\n    }\n    size = ngx_atosz(line->data, len);\n    if (size == NGX_ERROR) {\n        return NGX_ERROR;\n    }\n    size *= scale;\n    return size;\n}"]