------------------------------------------------------------ revno: 12398 revision-id: squid3@treenet.co.nz-20121124021152-b4264tvx35qdve6n parent: squid3@treenet.co.nz-20121124020412-ce5z1kjk1xqt4a7m author: Francesco Chemolli committer: Amos Jeffries branch nick: 3.3 timestamp: Fri 2012-11-23 19:11:52 -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-20121124021152-b4264tvx35qdve6n # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: d53b3512333e17083d555f877ba952eac9e9240c # timestamp: 2012-11-24 02:14:39 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121124020412-\ # ce5z1kjk1xqt4a7m # # Begin patch === modified file 'src/base/TextException.cc' --- src/base/TextException.cc 2012-08-14 11:53:07 +0000 +++ src/base/TextException.cc 2012-11-24 02:11:52 +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()