commit | d2edce76522169996fd86c49ab08f75935db62a2 | [log] [tgz] |
---|---|---|
author | Sergey Kandaurov <pluknet@nginx.com> | Fri May 08 19:19:16 2020 +0300 |
committer | Sergey Kandaurov <pluknet@nginx.com> | Fri May 08 19:19:16 2020 +0300 |
tree | 2ee4883591af3b9a48d28b68a79a4d3d9effce03 | |
parent | 8f9242e0269831d9c0f908d46cbd8f45858b43b9 [diff] |
Variables: fixed buffer over-read when evaluating "$arg_".
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index e067cf0..c2113c8 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c
@@ -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; }