Similar to ngx_http_file_cache_set_slot(), the last component of file->name
with a fixed length of 10 bytes, as generated in ngx_create_temp_path(), is
used as a source for the names of intermediate subdirectories with each one
taking its own part. Ensure that the sum of specified levels with slashes
fits into the length (ticket #731).
path->len += level + 1;
}
+ if (path->len > 10 + i) {
+ return "invalid value";
+ }
+
*slot = path;
if (ngx_add_path(cf, slot) == NGX_ERROR) {