diff options
Diffstat (limited to 'src/core/ngx_file.c')
-rw-r--r-- | src/core/ngx_file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c index ae2373511..3ebd73d8b 100644 --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -356,7 +356,7 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } if (ngx_conf_full_name(cf->cycle, &path->name, 0) != NGX_OK) { - return NULL; + return NGX_CONF_ERROR; } path->conf_file = cf->conf_file->file.name.data; @@ -372,8 +372,8 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) path->len += level + 1; } - while (i < 3) { - path->level[i++] = 0; + if (path->len > 10 + i) { + return "invalid value"; } *slot = path; |