Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
6061:953ef81705e1 | 6062:173561dfd567 |
---|---|
551 | 551 |
552 if (ngx_http_complex_value(r, &err_page->value, &uri) != NGX_OK) { | 552 if (ngx_http_complex_value(r, &err_page->value, &uri) != NGX_OK) { |
553 return NGX_ERROR; | 553 return NGX_ERROR; |
554 } | 554 } |
555 | 555 |
556 if (uri.data[0] == '/') { | 556 if (uri.len && uri.data[0] == '/') { |
557 | 557 |
558 if (err_page->value.lengths) { | 558 if (err_page->value.lengths) { |
559 ngx_http_split_args(r, &uri, &args); | 559 ngx_http_split_args(r, &uri, &args); |
560 | 560 |
561 } else { | 561 } else { |
568 } | 568 } |
569 | 569 |
570 return ngx_http_internal_redirect(r, &uri, &args); | 570 return ngx_http_internal_redirect(r, &uri, &args); |
571 } | 571 } |
572 | 572 |
573 if (uri.data[0] == '@') { | 573 if (uri.len && uri.data[0] == '@') { |
574 return ngx_http_named_location(r, &uri); | 574 return ngx_http_named_location(r, &uri); |
575 } | 575 } |
576 | 576 |
577 location = ngx_list_push(&r->headers_out.headers); | 577 location = ngx_list_push(&r->headers_out.headers); |
578 | 578 |