From: Amos Jeffries Date: Wed, 14 Jul 2010 23:47:08 +0000 (-0600) Subject: Author: Alex Rousskov X-Git-Tag: SQUID_3_1_5_1~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1930f2306a95df52ed2b7f68e7477b66f6665606;p=thirdparty%2Fsquid.git Author: Alex Rousskov Bug 2651: crash handling NULL write callback Check whether the old-style (function-based) callback has the function address to call. A writer may leave no "callback number". --- diff --git a/src/CommCalls.h b/src/CommCalls.h index c5b39411a1..5012e836b2 100644 --- a/src/CommCalls.h +++ b/src/CommCalls.h @@ -311,6 +311,9 @@ CommCbFunPtrCallT::canFire() if (!dialer.params.syncWithComm()) return cancel("out of sync w/comm"); + if (!dialer.handler) + return cancel("no callback requested"); + return true; }