r5150 - branches/2.1/varnish-cache/bin/varnishtop

tfheen at varnish-cache.org tfheen at varnish-cache.org
Mon Aug 30 14:01:05 CEST 2010


Author: tfheen
Date: 2010-08-30 14:01:05 +0200 (Mon, 30 Aug 2010)
New Revision: 5150

Modified:
   branches/2.1/varnish-cache/bin/varnishtop/varnishtop.c
Log:
Fix segfault on 32 bit machines

Adjust the size of the rec field to match what's in shmlog.

No corresponding -trunk commit as the code has been reworked already.

Fixes #765


Modified: branches/2.1/varnish-cache/bin/varnishtop/varnishtop.c
===================================================================
--- branches/2.1/varnish-cache/bin/varnishtop/varnishtop.c	2010-08-30 11:06:30 UTC (rev 5149)
+++ branches/2.1/varnish-cache/bin/varnishtop/varnishtop.c	2010-08-30 12:01:05 UTC (rev 5150)
@@ -55,7 +55,7 @@
 #include "varnishapi.h"
 
 struct top {
-	unsigned char		rec[4];
+	unsigned char		rec[SHMLOG_DATA-1];
 	unsigned char		*rec_data;
 	unsigned		clen;
 	unsigned		hash;




More information about the varnish-commit mailing list