]> git.kaiwu.me - nginx.git/commitdiff
stop on superfluous closing "}"
authorIgor Sysoev <igor@sysoev.ru>
Tue, 20 Feb 2007 14:33:26 +0000 (14:33 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 20 Feb 2007 14:33:26 +0000 (14:33 +0000)
src/core/ngx_conf_file.c

index e06315ee5bee0fe205ca5798b801b6ce5e1a468f..1bea4f87dca9d5c7f8317994b31b43dcd59e1ce8 100644 (file)
@@ -145,6 +145,12 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
         }
 
         if (rc == NGX_CONF_BLOCK_DONE) {
+            if (!block) {
+                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
+                rc = NGX_ERROR;
+                break;
+            }
+
             block = 0;
         }