changeset 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 5e1a8fe79c4b
children 0eb2dc4fdea8
files src/http/modules/ngx_http_ssi_filter_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;
         }