From: amosjeffries <> Date: Thu, 2 Aug 2007 07:20:47 +0000 (+0000) Subject: Fix possible NULL-pointer dereference in cacheDir display X-Git-Tag: SQUID_3_0_PRE7~130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4e9f2acad51a9829dc1dc8f30bdc2ded7d31af2;p=thirdparty%2Fsquid.git Fix possible NULL-pointer dereference in cacheDir display Picked up by Coverity checker. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index ffebcbf192..271b150d42 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.513 2007/06/28 15:18:16 rousskov Exp $ + * $Id: cache_cf.cc,v 1.514 2007/08/02 01:20:47 amosjeffries Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1245,6 +1245,7 @@ dump_cachedir(StoreEntry * entry, const char *name, _SquidConfig::_cacheSwap swa for (i = 0; i < swap.n_configured; i++) { s = dynamic_cast(swap.swapDirs[i].getRaw()); + if(!s) continue; storeAppendPrintf(entry, "%s %s %s", name, s->type(), s->path); s->dump(*entry); storeAppendPrintf(entry, "\n");