]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Made storeKeyText safe for entries that do not have a key set yet.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 27 Jun 2013 21:04:01 +0000 (15:04 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 27 Jun 2013 21:04:01 +0000 (15:04 -0600)
src/store_key_md5.cc

index 42145cb4b2ccc7e76e1ec7a2af961ce5136f96bb..aa1f4fa619524e00f389143129af368f39093956 100644 (file)
@@ -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;