]> git.kaiwu.me - nginx.git/commitdiff
Fixed off-by-one in xslt parameter parsing.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 22 Mar 2012 10:43:33 +0000 (10:43 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 22 Mar 2012 10:43:33 +0000 (10:43 +0000)
The problem was introduced in 0.7.44 (r2589) during conversion to complex
values.  Previously string.len included space for terminating NUL, but
with complex values it doesn't.

src/http/modules/ngx_http_xslt_filter_module.c

index f86c3038102bebc165fc58a68e5c66b1fe476205..0fb59f28873079f912ecaa93a3467eaf70774d1e 100644 (file)
@@ -585,7 +585,7 @@ ngx_http_xslt_params(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
                        "xslt filter param: \"%s\"", string.data);
 
         p = string.data;
-        last = string.data + string.len - 1;
+        last = string.data + string.len;
 
         while (p && *p) {