]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix error in config parser which would mis-assign the sslcrlfile directive.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 28 Jan 2013 05:40:06 +0000 (22:40 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 28 Jan 2013 05:40:06 +0000 (22:40 -0700)
Also, fix potentially crashing flaw in CPU affinity map display code.

  Detected by Coverity Scan, defects 740336 and 740337.

src/cache_cf.cc

index 444821523371e462219d23bbe02852a524875a08..ed493154dd234899f07d5246295e862486ddb22f 100644 (file)
@@ -2240,7 +2240,7 @@ parse_peer(peer ** 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);
@@ -4135,7 +4135,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]);
         }