[master] d1d1b78 calloc instead malloc to calm coverity

Guillaume Quintard guillaume at varnish-software.com
Tue Feb 14 15:10:06 CET 2017


commit d1d1b78059cddf3d27986759af9d57575c77ea4a
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Feb 14 15:07:55 2017 +0100

    calloc instead malloc to calm coverity

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 9266bdc..77a545e 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -1415,7 +1415,7 @@ cmd_http_sendhex(CMD_ARGS)
 	AN(av[1]);
 	AZ(av[2]);
 	l = strlen(av[1]) / 2;
-	p = malloc(l);
+	p = calloc(1, l);
 	AN(p);
 	q = av[1];
 	for (i = 0; i < l; i++) {



More information about the varnish-commit mailing list