From: hno <> Date: Sat, 3 Apr 2004 21:38:36 +0000 (+0000) Subject: Bug #835: assertion failed: pinger.c:187: "icmp_pktsize <= MAX_PKT_SZ" X-Git-Tag: SQUID_3_0_PRE4~1126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e353bdf2d3f3c9c70ec79e7d2b272537446eb177;p=thirdparty%2Fsquid.git Bug #835: assertion failed: pinger.c:187: "icmp_pktsize <= MAX_PKT_SZ" 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. --- diff --git a/src/pinger.cc b/src/pinger.cc index 68800b9a5c..efdb665e6e 100644 --- a/src/pinger.cc +++ b/src/pinger.cc @@ -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) {