From: Francesco Chemolli Date: Sat, 24 Nov 2012 02:11:52 +0000 (-0700) Subject: Fix TextException: gracefully handle exceptions with null text messages. X-Git-Tag: SQUID_3_3_0_2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e275bfdfc15acb1e6b36beb4d39b03ea79900dae;p=thirdparty%2Fsquid.git Fix TextException: gracefully handle exceptions with null text messages. --- diff --git a/src/base/TextException.cc b/src/base/TextException.cc index 555433b3ab..c18f2cc5c8 100644 --- a/src/base/TextException.cc +++ b/src/base/TextException.cc @@ -17,7 +17,7 @@ TextException::TextException(const TextException& right) : } TextException::TextException(const char *aMsg, const char *aFileName, int aLineNo, unsigned int anId): - message(xstrdup(aMsg)), theFileName(aFileName), theLineNo(aLineNo), theId(anId) + message(aMsg?xstrdup(aMsg):NULL), theFileName(aFileName), theLineNo(aLineNo), theId(anId) {} TextException::~TextException() throw()