From cccc5528945be46d6afb456e7aba751340af9089 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 14 Apr 2004 20:34:05 +0000 Subject: nginx-0.0.3-2004-04-15-00:34:05 import --- src/core/nginx.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/nginx.c') diff --git a/src/core/nginx.c b/src/core/nginx.c index 56a891497..a784040a7 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -277,6 +277,13 @@ static ngx_int_t ngx_getopt(ngx_master_ctx_t *ctx, ngx_cycle_t *cycle) switch (ctx->argv[i][1]) { case 'c': + if (ctx->argv[i + 1] == NULL) { + ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, + "the option: \"%s\" requires file name", + ctx->argv[i]); + return NGX_ERROR; + } + cycle->conf_file.data = (u_char *) ctx->argv[++i]; cycle->conf_file.len = ngx_strlen(cycle->conf_file.data); break; -- cgit