]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix TextException: gracefully handle exceptions with null text messages.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 26 Nov 2012 10:24:10 +0000 (03:24 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 26 Nov 2012 10:24:10 +0000 (03:24 -0700)
src/base/TextException.cc

index ef66a3793101c25d44db89e59233772a8717de6f..849acd8ce7ad2e2d70fddbe1346ca94aa9273bf8 100644 (file)
@@ -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()