src/http/ngx_http_file_cache.c:1750: error: Buffer Overrun S2
  Offset: [`cache->path->len`, +oo] Size: [0, +oo] by call to `ngx_http_file_cache_delete`.

src/http/ngx_http_file_cache.c:1700:1: Parameter `cache->path->len`
1698. 
1699. 
1700. static time_t
      ^
1701. ngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)
1702. {

src/http/ngx_http_file_cache.c:1750:13: Call
1748. 
1749.         if (fcn->count == 0) {
1750.             ngx_http_file_cache_delete(cache, q, name);
                  ^
1751.             wait = 0;
1752.             break;

src/http/ngx_http_file_cache.c:1905:1: Parameter `*name`
  1903. 
  1904. 
  1905. static void
        ^
  1906. ngx_http_file_cache_delete(ngx_http_file_cache_t *cache, ngx_queue_t *q,
  1907.     u_char *name)

src/http/ngx_http_file_cache.c:1932:9: Call
  1930. 
  1931.         len = path->name.len + 1 + path->len + 2 * NGX_HTTP_CACHE_KEY_LEN;
  1932.         ngx_create_hashed_filename(path, name, len);
                ^
  1933. 
  1934.         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,

src/core/ngx_file.c:240:1: <Offset trace>
238. 
239. 
240. void
     ^
241. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
242. {

src/core/ngx_file.c:240:1: Parameter `path->len`
    238. 
    239. 
    240. void
         ^
    241. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
    242. {

src/core/ngx_file.c:240:1: <Length trace>
238. 
239. 
240. void
     ^
241. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
242. {

src/core/ngx_file.c:240:1: Parameter `*file`
    238. 
    239. 
    240. void
         ^
    241. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
    242. {

src/core/ngx_file.c:248:5: Array access: Offset: [cache->path->len, +oo] Size: [0, +oo] by call to `ngx_http_file_cache_delete` 
    246.     i = path->name.len + 1;
    247. 
    248.     file[path->name.len + path->len]  = '/';
             ^
    249. 
    250.     for (n = 0; n < NGX_MAX_PATH_LEVEL; n++) {

void
ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
{
    size_t      i, level;
    ngx_uint_t  n;
    i = path->name.len + 1;
    file[path->name.len + path->len]  = '/';
    for (n = 0; n < NGX_MAX_PATH_LEVEL; n++) {
        level = path->level[n];
        if (level == 0) {
            break;
        }
        len -= level;
        file[i - 1] = '/';
        ngx_memcpy(&file[i], &file[len], level);
        i += level + 1;
    }
}
['static time_t\nngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)\n{\n    u_char                      *name, *p;\n    size_t                       len;\n    time_t                       wait;\n    ngx_uint_t                   tries;\n    ngx_path_t                  *path;\n    ngx_queue_t                 *q, *sentinel;\n    ngx_http_file_cache_node_t  *fcn;\n    u_char                       key[2 * NGX_HTTP_CACHE_KEY_LEN];\n    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,\n                   "http file cache forced expire");\n    path = cache->path;\n    len = path->name.len + 1 + path->len + 2 * NGX_HTTP_CACHE_KEY_LEN;\n    name = ngx_alloc(len + 1, ngx_cycle->log);\n    if (name == NULL) {\n        return 10;\n    }\n    ngx_memcpy(name, path->name.data, path->name.len);\n    wait = 10;\n    tries = 20;\n    sentinel = NULL;\n    ngx_shmtx_lock(&cache->shpool->mutex);\n    for ( ;; ) {\n        if (ngx_queue_empty(&cache->sh->queue)) {\n            break;\n        }\n        q = ngx_queue_last(&cache->sh->queue);\n        if (q == sentinel) {\n            break;\n        }\n        fcn = ngx_queue_data(q, ngx_http_file_cache_node_t, queue);\n        ngx_log_debug6(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,\n                  "http file cache forced expire: #%d %d %02xd%02xd%02xd%02xd",\n                  fcn->count, fcn->exists,\n                  fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]);\n        if (fcn->count == 0) {\n            ngx_http_file_cache_delete(cache, q, name);\n            wait = 0;\n            break;\n        }\n        p = ngx_hex_dump(key, (u_char *) &fcn->node.key,\n                         sizeof(ngx_rbtree_key_t));\n        len = NGX_HTTP_CACHE_KEY_LEN - sizeof(ngx_rbtree_key_t);\n        (void) ngx_hex_dump(p, fcn->key, len);\n        ngx_queue_remove(q);\n        fcn->expire = ngx_time() + cache->inactive;\n        ngx_queue_insert_head(&cache->sh->queue, &fcn->queue);\n        ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,\n                      "ignore long locked inactive cache entry %*s, count:%d",\n                      (size_t) 2 * NGX_HTTP_CACHE_KEY_LEN, key, fcn->count);\n        if (sentinel == NULL) {\n            sentinel = q;\n        }\n        if (--tries) {\n            continue;\n        }\n        wait = 1;\n        break;\n    }\n    ngx_shmtx_unlock(&cache->shpool->mutex);\n    ngx_free(name);\n    return wait;\n}', 'static void\nngx_http_file_cache_delete(ngx_http_file_cache_t *cache, ngx_queue_t *q,\n    u_char *name)\n{\n    u_char                      *p;\n    size_t                       len;\n    ngx_path_t                  *path;\n    ngx_http_file_cache_node_t  *fcn;\n    fcn = ngx_queue_data(q, ngx_http_file_cache_node_t, queue);\n    if (fcn->exists) {\n        cache->sh->size -= fcn->fs_size;\n        path = cache->path;\n        p = name + path->name.len + 1 + path->len;\n        p = ngx_hex_dump(p, (u_char *) &fcn->node.key,\n                         sizeof(ngx_rbtree_key_t));\n        len = NGX_HTTP_CACHE_KEY_LEN - sizeof(ngx_rbtree_key_t);\n        p = ngx_hex_dump(p, fcn->key, len);\n        *p = \'\\0\';\n        fcn->count++;\n        fcn->deleting = 1;\n        ngx_shmtx_unlock(&cache->shpool->mutex);\n        len = path->name.len + 1 + path->len + 2 * NGX_HTTP_CACHE_KEY_LEN;\n        ngx_create_hashed_filename(path, name, len);\n        ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,\n                       "http file cache expire: \\"%s\\"", name);\n        if (ngx_delete_file(name) == NGX_FILE_ERROR) {\n            ngx_log_error(NGX_LOG_CRIT, ngx_cycle->log, ngx_errno,\n                          ngx_delete_file_n " \\"%s\\" failed", name);\n        }\n        ngx_shmtx_lock(&cache->shpool->mutex);\n        fcn->count--;\n        fcn->deleting = 0;\n    }\n    if (fcn->count == 0) {\n        ngx_queue_remove(q);\n        ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node);\n        ngx_slab_free_locked(cache->shpool, fcn);\n        cache->sh->count--;\n    }\n}', "void\nngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)\n{\n    size_t      i, level;\n    ngx_uint_t  n;\n    i = path->name.len + 1;\n    file[path->name.len + path->len]  = '/';\n    for (n = 0; n < NGX_MAX_PATH_LEVEL; n++) {\n        level = path->level[n];\n        if (level == 0) {\n            break;\n        }\n        len -= level;\n        file[i - 1] = '/';\n        ngx_memcpy(&file[i], &file[len], level);\n        i += level + 1;\n    }\n}"]