diff src/http/modules/ngx_http_ssi_filter_module.c @ 1190:99c56c0f514e

fix segfault or parsing error in '<!--# if expr="$var = /" -->'
author Igor Sysoev <igor@sysoev.ru>
date Wed, 02 May 2007 08:07:37 +0000
parents ea5676ca98f4
children c3541b8973de
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -2376,7 +2376,7 @@ ngx_http_ssi_if(ngx_http_request_t *r, n
         p++;
     }
 
-    if (p < last && *p == '/') {
+    if (p < last - 1 && *p == '/') {
         if (*(last - 1) != '/') {
             goto invalid_expression;
         }