]> git.kaiwu.me - nginx.git/commitdiff
fix segfault or parsing error in '<!--# if expr="$var = /" -->'
authorIgor Sysoev <igor@sysoev.ru>
Wed, 2 May 2007 08:07:37 +0000 (08:07 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 2 May 2007 08:07:37 +0000 (08:07 +0000)
src/http/modules/ngx_http_ssi_filter_module.c

index 79e89f18ad02defea81cc13926186998089184f2..f16c34736e4f337fc9d9de06630437a6a41cf510 100644 (file)
@@ -2376,7 +2376,7 @@ ngx_http_ssi_if(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx,
         p++;
     }
 
-    if (p < last && *p == '/') {
+    if (p < last - 1 && *p == '/') {
         if (*(last - 1) != '/') {
             goto invalid_expression;
         }