]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix error in configuration parser which would misassigne the sslcrlfile directive.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 27 Dec 2012 18:15:38 +0000 (19:15 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 27 Dec 2012 18:15:38 +0000 (19:15 +0100)
Fix potentially crashing flaw in CPU affinity map display code.

Detected by Coverity Scan, defects 740336 and 740337.

src/cache_cf.cc

index 0464f7685c245f97f65be31d4a2d70956ec871bc..ea918934f37ff5f727e6b36d5cbe2834a30beecd 100644 (file)
@@ -2281,7 +2281,7 @@ parse_peer(CachePeer ** head)
             p->sslcapath = xstrdup(token + 10);
         } else if (strncmp(token, "sslcrlfile=", 11) == 0) {
             safe_free(p->sslcrlfile);
-            p->sslcapath = xstrdup(token + 10);
+            p->sslcrlfile = xstrdup(token + 11);
         } else if (strncmp(token, "sslflags=", 9) == 0) {
             safe_free(p->sslflags);
             p->sslflags = xstrdup(token + 9);
@@ -4178,7 +4178,7 @@ dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAf
                               cpuAffinityMap->processes()[i]);
         }
         storeAppendPrintf(entry, " cores=");
-        for (size_t i = 0; i < cpuAffinityMap->processes().size(); ++i) {
+        for (size_t i = 0; i < cpuAffinityMap->cores().size(); ++i) {
             storeAppendPrintf(entry, "%s%i", (i ? "," : ""),
                               cpuAffinityMap->cores()[i]);
         }