From: Alex Rousskov Date: Thu, 27 Jun 2013 21:04:01 +0000 (-0600) Subject: Made storeKeyText safe for entries that do not have a key set yet. X-Git-Tag: SQUID_3_5_0_1~444^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c3cd04272bbebcb78e8e7c3dbf527a33ca47414;p=thirdparty%2Fsquid.git Made storeKeyText safe for entries that do not have a key set yet. --- diff --git a/src/store_key_md5.cc b/src/store_key_md5.cc index 42145cb4b2..aa1f4fa619 100644 --- a/src/store_key_md5.cc +++ b/src/store_key_md5.cc @@ -43,6 +43,9 @@ static cache_key null_key[SQUID_MD5_DIGEST_LENGTH]; const char * storeKeyText(const cache_key *key) { + if (!key) + return "[null_store_key]"; + static char buf[SQUID_MD5_DIGEST_LENGTH * 2+1]; int i;