r4044 - trunk/varnish-cache/bin/varnishtest

phk at projects.linpro.no phk at projects.linpro.no
Fri May 1 11:56:36 CEST 2009


Author: phk
Date: 2009-05-01 11:56:36 +0200 (Fri, 01 May 2009)
New Revision: 4044

Modified:
   trunk/varnish-cache/bin/varnishtest/vtc_http.c
Log:
Don't overrun rxbuf



Modified: trunk/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_http.c	2009-04-30 10:55:22 UTC (rev 4043)
+++ trunk/varnish-cache/bin/varnishtest/vtc_http.c	2009-05-01 09:56:36 UTC (rev 4044)
@@ -321,7 +321,7 @@
 			vtc_log(hp->vl, 0, "HTTP rx failed (%s)",
 			    strerror(errno));
 		assert(i > 0);
-		assert(hp->prxbuf < hp->nrxbuf);
+		assert(hp->prxbuf + n < hp->nrxbuf);
 		i = read(hp->fd, hp->rxbuf + hp->prxbuf, n);
 		if (i == 0)
 			return (i);



More information about the varnish-commit mailing list