src/http/ngx_http_file_cache.c:862: 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:802:1: Parameter `cache->path->len`
800. 
801. 
802. static time_t
     ^
803. ngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)
804. {

src/http/ngx_http_file_cache.c:862:9: Call
860.         }
861. 
862.         ngx_http_file_cache_delete(cache, q, name);
             ^
863. 
864.         break;

src/http/ngx_http_file_cache.c:971:1: Parameter `*name`
  969. 
  970. 
  971. static void
       ^
  972. ngx_http_file_cache_delete(ngx_http_file_cache_t *cache, ngx_queue_t *q,
  973.     u_char *name)

src/http/ngx_http_file_cache.c:1004:5: Call
  1002.     len = path->name.len + 1 + path->len + 2 * NGX_HTTP_CACHE_KEY_LEN;
  1003. 
  1004.     ngx_create_hashed_filename(path, name, len);
            ^
  1005. 
  1006.     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,

src/core/ngx_file.c:122:1: <Offset trace>
120. 
121. 
122. void
     ^
123. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
124. {

src/core/ngx_file.c:122:1: Parameter `path->len`
    120. 
    121. 
    122. void
         ^
    123. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
    124. {

src/core/ngx_file.c:122:1: <Length trace>
120. 
121. 
122. void
     ^
123. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
124. {

src/core/ngx_file.c:122:1: Parameter `*file`
    120. 
    121. 
    122. void
         ^
    123. ngx_create_hashed_filename(ngx_path_t *path, u_char *file, size_t len)
    124. {

src/core/ngx_file.c:130:5: Array access: Offset: [cache->path->len, +oo] Size: [0, +oo] by call to `ngx_http_file_cache_delete` 
    128.     i = path->name.len + 1;
    129. 
    130.     file[path->name.len + path->len]  = '/';
             ^
    131. 
    132.     for (n = 0; n < 3; 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 < 3; 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;\n    size_t                       len;\n    time_t                       wait;\n    ngx_uint_t                   tries;\n    ngx_path_t                  *path;\n    ngx_queue_t                 *q;\n    ngx_http_file_cache_node_t  *fcn;\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 = 0;\n    ngx_shmtx_lock(&cache->shpool->mutex);\n    for (q = ngx_queue_last(cache->queue);\n         q != ngx_queue_sentinel(cache->queue);\n         q = ngx_queue_prev(q))\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) {\n            if (tries++ < 20) {\n                continue;\n            }\n            wait = 1;\n            break;\n        }\n        if (!fcn->exists) {\n            ngx_queue_remove(q);\n            ngx_rbtree_delete(cache->rbtree, &fcn->node);\n            ngx_slab_free_locked(cache->shpool, fcn);\n            break;\n        }\n        ngx_http_file_cache_delete(cache, q, name);\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    *cache->size -= (fcn->length + cache->bsize - 1) / cache->bsize;\n    path = cache->path;\n    p = name + path->name.len + 1 + path->len;\n    p = ngx_hex_dump(p, (u_char *) &fcn->node.key, 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    ngx_queue_remove(q);\n    ngx_rbtree_delete(cache->rbtree, &fcn->node);\n    ngx_slab_free_locked(cache->shpool, fcn);\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}', "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 < 3; 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}"]