From: Francesco Chemolli Date: Wed, 14 Nov 2012 18:17:09 +0000 (+0100) Subject: Bug fix in TextException: gracefully handle exceptions with null text messages. X-Git-Tag: SQUID_3_4_0_1~509 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98b38615380c122f7baf8f91f1086a89c67df563;p=thirdparty%2Fsquid.git Bug fix in 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()