src/http/ngx_http_file_cache.c:2429: error: Integer Overflow L2
  ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_parse_size`.

src/http/ngx_http_file_cache.c:2419:28: Unknown value from: strchr
2417.             name.data = value[i].data + 10;
2418. 
2419.             p = (u_char *) ngx_strchr(name.data, ':');
                                 ^
2420. 
2421.             if (p) {

src/http/ngx_http_file_cache.c:2429:24: Call
2427.                 s.data = p;
2428. 
2429.                 size = ngx_parse_size(&s);
                             ^
2430.                 if (size >= (ssize_t) (2 * ngx_pagesize)) {
2431.                     continue;

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

src/core/ngx_parse.c:47:12: Call
  45.     }
  46. 
  47.     size = ngx_atosz(line->data, len);
                 ^
  48.     if (size == NGX_ERROR || size > max) {
  49.         return NGX_ERROR;

src/core/ngx_string.c:1010:5: <LHS trace>
1008.     }
1009. 
1010.     cutoff = NGX_MAX_SIZE_T_VALUE / 10;
          ^
1011.     cutlim = NGX_MAX_SIZE_T_VALUE % 10;
1012. 

src/core/ngx_string.c:1010:5: Assignment
    1008.     }
    1009. 
    1010.     cutoff = NGX_MAX_SIZE_T_VALUE / 10;
              ^
    1011.     cutlim = NGX_MAX_SIZE_T_VALUE % 10;
    1012. 

src/core/ngx_string.c:1001:1: <RHS trace>
 999. 
1000. 
1001. ssize_t
      ^
1002. ngx_atosz(u_char *line, size_t n)
1003. {

src/core/ngx_string.c:1001:1: Parameter `*line`
     999. 
    1000. 
    1001. ssize_t
          ^
    1002. ngx_atosz(u_char *line, size_t n)
    1003. {

src/core/ngx_string.c:1022:9: Binary operation: ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_parse_size` 
    1020.         }
    1021. 
    1022.         value = value * 10 + (*line - '0');
                  ^
    1023.     }
    1024. 

ssize_t
ngx_atosz(u_char *line, size_t n)
{
    ssize_t  value, cutoff, cutlim;
    if (n == 0) {
        return NGX_ERROR;
    }
    cutoff = NGX_MAX_SIZE_T_VALUE / 10;
    cutlim = NGX_MAX_SIZE_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;
}
['char *\nngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)\n{\n    char  *confp = conf;\n    off_t                   max_size;\n    u_char                 *last, *p;\n    time_t                  inactive;\n    ssize_t                 size;\n    ngx_str_t               s, name, *value;\n    ngx_int_t               loader_files, manager_files;\n    ngx_msec_t              loader_sleep, manager_sleep, loader_threshold,\n                            manager_threshold;\n    ngx_uint_t              i, n, use_temp_path;\n    ngx_array_t            *caches;\n    ngx_http_file_cache_t  *cache, **ce;\n    cache = ngx_pcalloc(cf->pool, sizeof(ngx_http_file_cache_t));\n    if (cache == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    cache->path = ngx_pcalloc(cf->pool, sizeof(ngx_path_t));\n    if (cache->path == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    use_temp_path = 1;\n    inactive = 600;\n    loader_files = 100;\n    loader_sleep = 50;\n    loader_threshold = 200;\n    manager_files = 100;\n    manager_sleep = 50;\n    manager_threshold = 200;\n    name.len = 0;\n    size = 0;\n    max_size = NGX_MAX_OFF_T_VALUE;\n    value = cf->args->elts;\n    cache->path->name = value[1];\n    if (cache->path->name.data[cache->path->name.len - 1] == \'/\') {\n        cache->path->name.len--;\n    }\n    if (ngx_conf_full_name(cf->cycle, &cache->path->name, 0) != NGX_OK) {\n        return NGX_CONF_ERROR;\n    }\n    for (i = 2; i < cf->args->nelts; i++) {\n        if (ngx_strncmp(value[i].data, "levels=", 7) == 0) {\n            p = value[i].data + 7;\n            last = value[i].data + value[i].len;\n            for (n = 0; n < NGX_MAX_PATH_LEVEL && p < last; n++) {\n                if (*p > \'0\' && *p < \'3\') {\n                    cache->path->level[n] = *p++ - \'0\';\n                    cache->path->len += cache->path->level[n] + 1;\n                    if (p == last) {\n                        break;\n                    }\n                    if (*p++ == \':\' && n < NGX_MAX_PATH_LEVEL - 1 && p < last) {\n                        continue;\n                    }\n                    goto invalid_levels;\n                }\n                goto invalid_levels;\n            }\n            if (cache->path->len < 10 + NGX_MAX_PATH_LEVEL) {\n                continue;\n            }\n        invalid_levels:\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "invalid \\"levels\\" \\"%V\\"", &value[i]);\n            return NGX_CONF_ERROR;\n        }\n        if (ngx_strncmp(value[i].data, "use_temp_path=", 14) == 0) {\n            if (ngx_strcmp(&value[i].data[14], "on") == 0) {\n                use_temp_path = 1;\n            } else if (ngx_strcmp(&value[i].data[14], "off") == 0) {\n                use_temp_path = 0;\n            } else {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid use_temp_path value \\"%V\\", "\n                                   "it must be \\"on\\" or \\"off\\"",\n                                   &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "keys_zone=", 10) == 0) {\n            name.data = value[i].data + 10;\n            p = (u_char *) ngx_strchr(name.data, \':\');\n            if (p) {\n                name.len = p - name.data;\n                p++;\n                s.len = value[i].data + value[i].len - p;\n                s.data = p;\n                size = ngx_parse_size(&s);\n                if (size >= (ssize_t) (2 * ngx_pagesize)) {\n                    continue;\n                }\n            }\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "invalid keys zone size \\"%V\\"", &value[i]);\n            return NGX_CONF_ERROR;\n        }\n        if (ngx_strncmp(value[i].data, "inactive=", 9) == 0) {\n            s.len = value[i].len - 9;\n            s.data = value[i].data + 9;\n            inactive = ngx_parse_time(&s, 1);\n            if (inactive == (time_t) NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid inactive value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "max_size=", 9) == 0) {\n            s.len = value[i].len - 9;\n            s.data = value[i].data + 9;\n            max_size = ngx_parse_offset(&s);\n            if (max_size < 0) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid max_size value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "loader_files=", 13) == 0) {\n            loader_files = ngx_atoi(value[i].data + 13, value[i].len - 13);\n            if (loader_files == NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid loader_files value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "loader_sleep=", 13) == 0) {\n            s.len = value[i].len - 13;\n            s.data = value[i].data + 13;\n            loader_sleep = ngx_parse_time(&s, 0);\n            if (loader_sleep == (ngx_msec_t) NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid loader_sleep value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "loader_threshold=", 17) == 0) {\n            s.len = value[i].len - 17;\n            s.data = value[i].data + 17;\n            loader_threshold = ngx_parse_time(&s, 0);\n            if (loader_threshold == (ngx_msec_t) NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid loader_threshold value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "manager_files=", 14) == 0) {\n            manager_files = ngx_atoi(value[i].data + 14, value[i].len - 14);\n            if (manager_files == NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid manager_files value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "manager_sleep=", 14) == 0) {\n            s.len = value[i].len - 14;\n            s.data = value[i].data + 14;\n            manager_sleep = ngx_parse_time(&s, 0);\n            if (manager_sleep == (ngx_msec_t) NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid manager_sleep value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[i].data, "manager_threshold=", 18) == 0) {\n            s.len = value[i].len - 18;\n            s.data = value[i].data + 18;\n            manager_threshold = ngx_parse_time(&s, 0);\n            if (manager_threshold == (ngx_msec_t) NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid manager_threshold value \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid parameter \\"%V\\"", &value[i]);\n        return NGX_CONF_ERROR;\n    }\n    if (name.len == 0 || size == 0) {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "\\"%V\\" must have \\"keys_zone\\" parameter",\n                           &cmd->name);\n        return NGX_CONF_ERROR;\n    }\n    cache->path->manager = ngx_http_file_cache_manager;\n    cache->path->loader = ngx_http_file_cache_loader;\n    cache->path->data = cache;\n    cache->path->conf_file = cf->conf_file->file.name.data;\n    cache->path->line = cf->conf_file->line;\n    cache->loader_files = loader_files;\n    cache->loader_sleep = loader_sleep;\n    cache->loader_threshold = loader_threshold;\n    cache->manager_files = manager_files;\n    cache->manager_sleep = manager_sleep;\n    cache->manager_threshold = manager_threshold;\n    if (ngx_add_path(cf, &cache->path) != NGX_OK) {\n        return NGX_CONF_ERROR;\n    }\n    cache->shm_zone = ngx_shared_memory_add(cf, &name, size, cmd->post);\n    if (cache->shm_zone == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    if (cache->shm_zone->data) {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "duplicate zone \\"%V\\"", &name);\n        return NGX_CONF_ERROR;\n    }\n    cache->shm_zone->init = ngx_http_file_cache_init;\n    cache->shm_zone->data = cache;\n    cache->use_temp_path = use_temp_path;\n    cache->inactive = inactive;\n    cache->max_size = max_size;\n    caches = (ngx_array_t *) (confp + cmd->offset);\n    ce = ngx_array_push(caches);\n    if (ce == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    *ce = cache;\n    return NGX_CONF_OK;\n}', "ssize_t\nngx_parse_size(ngx_str_t *line)\n{\n    u_char   unit;\n    size_t   len;\n    ssize_t  size, scale, max;\n    len = line->len;\n    if (len == 0) {\n        return NGX_ERROR;\n    }\n    unit = line->data[len - 1];\n    switch (unit) {\n    case 'K':\n    case 'k':\n        len--;\n        max = NGX_MAX_SIZE_T_VALUE / 1024;\n        scale = 1024;\n        break;\n    case 'M':\n    case 'm':\n        len--;\n        max = NGX_MAX_SIZE_T_VALUE / (1024 * 1024);\n        scale = 1024 * 1024;\n        break;\n    default:\n        max = NGX_MAX_SIZE_T_VALUE;\n        scale = 1;\n    }\n    size = ngx_atosz(line->data, len);\n    if (size == NGX_ERROR || size > max) {\n        return NGX_ERROR;\n    }\n    size *= scale;\n    return size;\n}", "ssize_t\nngx_atosz(u_char *line, size_t n)\n{\n    ssize_t  value, cutoff, cutlim;\n    if (n == 0) {\n        return NGX_ERROR;\n    }\n    cutoff = NGX_MAX_SIZE_T_VALUE / 10;\n    cutlim = NGX_MAX_SIZE_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}"]