From 372b624627b3f943ffd1227ff8aacbae7b42880f Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Tue, 17 Jul 2018 15:30:43 +0300 Subject: Fixed invalid access to location defined as an empty string. --- src/http/modules/ngx_http_grpc_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules/ngx_http_grpc_module.c') diff --git a/src/http/modules/ngx_http_grpc_module.c b/src/http/modules/ngx_http_grpc_module.c index 3bdf06a6a..7fbf7366f 100644 --- a/src/http/modules/ngx_http_grpc_module.c +++ b/src/http/modules/ngx_http_grpc_module.c @@ -4525,7 +4525,7 @@ ngx_http_grpc_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) clcf->handler = ngx_http_grpc_handler; - if (clcf->name.data[clcf->name.len - 1] == '/') { + if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') { clcf->auto_redirect = 1; } -- cgit