]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #835: assertion failed: pinger.c:187: "icmp_pktsize <= MAX_PKT_SZ"
authorhno <>
Sat, 3 Apr 2004 21:38:36 +0000 (21:38 +0000)
committerhno <>
Sat, 3 Apr 2004 21:38:36 +0000 (21:38 +0000)
In Squids built with --enable-icmp the pinger helper may exit with the above
assertion failure if Squid receives a request with a very long host name.

src/pinger.cc

index 68800b9a5ccf314004cc28b17b9f8b967e3b717e..efdb665e6e43d7be825f0f65d4d162e97ac6dea7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.cc,v 1.52 2003/04/24 06:35:09 hno Exp $
+ * $Id: pinger.cc,v 1.53 2004/04/03 14:38:36 hno Exp $
  *
  * DEBUG: section 42    ICMP Pinger program
  * AUTHOR: Duane Wessels
@@ -356,7 +356,8 @@ pingerSendEcho(struct in_addr to, int opcode, char *payload, int len)
     echo = (icmpEchoData *) (icmp + 1);
     echo->opcode = (unsigned char) opcode;
     echo->tv = current_time;
-    icmp_pktsize += sizeof(icmpEchoData) - MAX_PAYLOAD;
+
+    icmp_pktsize += sizeof(struct timeval) + sizeof(char);
 
     if (payload)
     {