[PATCH] Fixed incorrect ngx_str_set() usage, broken in c82b2e020b9f.

Maxim Dounin mdounin at mdounin.ru
Sat Dec 7 13:29:37 UTC 2013


Hello!

On Fri, Dec 06, 2013 at 04:01:52PM -0800, Piotr Sikora wrote:

> Damn it, I've lost one digit in Scan CID.
> 
> # HG changeset patch
> # User Piotr Sikora <piotr at cloudflare.com>
> # Date 1386374449 28800
> #      Fri Dec 06 16:00:49 2013 -0800
> # Node ID 58716fd3bd2d63c93b0c04fa121232b7126e724b
> # Parent  1bdf906bba99b4c03d306dd8f2756d4d8ffa4a13
> Fixed incorrect ngx_str_set() usage, broken in c82b2e020b9f.
> 
> Found by Coverity Scan CID 1135525.
> 
> Signed-off-by: Piotr Sikora <piotr at cloudflare.com>
> 
> diff -r 1bdf906bba99 -r 58716fd3bd2d src/http/modules/ngx_http_uwsgi_module.c
> --- a/src/http/modules/ngx_http_uwsgi_module.c Fri Dec 06 19:58:27 2013 +0400
> +++ b/src/http/modules/ngx_http_uwsgi_module.c Fri Dec 06 16:00:49 2013 -0800
> @@ -603,7 +603,7 @@ ngx_http_uwsgi_eval(ngx_http_request_t *
>          url.url.len -= add;
> 
>      } else {
> -        ngx_str_set(&u->schema, (u_char *) "uwsgi://");
> +        ngx_str_set(&u->schema, "uwsgi://");
>      }
> 
>      url.no_resolve = 1;

Committed, thanks.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx-devel mailing list