------------------------------------------------------------ revno: 11713 revision-id: squid3@treenet.co.nz-20121126102410-fo2w3p8mn0nnmewa parent: squid3@treenet.co.nz-20121126102330-fsa1fwlzizn8sqcj author: Francesco Chemolli committer: Amos Jeffries branch nick: 3.2 timestamp: Mon 2012-11-26 03:24:10 -0700 message: Fix TextException: gracefully handle exceptions with null text messages. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121126102410-fo2w3p8mn0nnmewa # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: ae4f97b8a382120e59d70f93a875cf5f01d96567 # timestamp: 2012-11-26 10:25:04 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # base_revision_id: squid3@treenet.co.nz-20121126102330-\ # fsa1fwlzizn8sqcj # # Begin patch === modified file 'src/base/TextException.cc' --- src/base/TextException.cc 2012-07-28 05:38:50 +0000 +++ src/base/TextException.cc 2012-11-26 10:24:10 +0000 @@ -17,7 +17,7 @@ } 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()