Mercurial > hg > nginx
diff src/http/ngx_http_variables.c @ 7648:028b16e2798f
Variables: fixed buffer over-read when evaluating "$arg_".
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 08 May 2020 19:19:16 +0300 |
parents | 89adf49fe76a |
children | 6d4f7d5e279f |
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c Thu Apr 23 15:10:26 2020 +0300 +++ b/src/http/ngx_http_variables.c Fri May 08 19:19:16 2020 +0300 @@ -1075,7 +1075,7 @@ len = name->len - (sizeof("arg_") - 1); arg = name->data + sizeof("arg_") - 1; - if (ngx_http_arg(r, arg, len, &value) != NGX_OK) { + if (len == 0 || ngx_http_arg(r, arg, len, &value) != NGX_OK) { v->not_found = 1; return NGX_OK; }