Mercurial > hg > nginx-quic
diff src/http/ngx_http_special_response.c @ 6062:173561dfd567
Fixed invalid access to complex value defined as an empty string.
Found by Valgrind.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 31 Mar 2015 17:45:50 +0300 |
parents | 6b479db5b52b |
children | 9d00576252aa |
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -553,7 +553,7 @@ ngx_http_send_error_page(ngx_http_reques return NGX_ERROR; } - if (uri.data[0] == '/') { + if (uri.len && uri.data[0] == '/') { if (err_page->value.lengths) { ngx_http_split_args(r, &uri, &args); @@ -570,7 +570,7 @@ ngx_http_send_error_page(ngx_http_reques return ngx_http_internal_redirect(r, &uri, &args); } - if (uri.data[0] == '@') { + if (uri.len && uri.data[0] == '@') { return ngx_http_named_location(r, &uri); }