[master] 3648ab627 Missing null check

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Apr 30 08:02:55 UTC 2019


--------
In message <20190430075607.E3704AF893 at lists.varnish-cache.org>, Dridi Boukelmou
ne writes:

That is actually not what Coverity complained about, but I had already
added the missing AN(body) before we got the report.

>    Missing null check
>    
>    Spotted by Coverity Scan.
>
>diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
>index 41baa8803..42006ef3d 100644
>--- a/bin/varnishtest/vtc_http2.c
>+++ b/bin/varnishtest/vtc_http2.c
>@@ -1518,6 +1518,7 @@ cmd_tx11obj(CMD_ARGS)
> 		else if (CMD_IS("txreq") || CMD_IS("txresp")) {
> 			if (AV_IS("-body")) {
> 				AZ(body);
>+				AN(av[1]);
> 				REPLACE(body, av[1]);
> 				AN(body);
> 				bodylen = strlen(body);


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the varnish-commit mailing list