From 80ee9483a722ea2e210122e8b7ce68c7b23b054b Mon Sep 17 00:00:00 2001 From: Disconnect3d Date: Mon, 13 Apr 2020 16:45:14 +0200 Subject: [PATCH] Fix rlm_cache_ sanity check for crazy people (#3370) This PR fixes an incorrect size argument passed to `strncmp` which resulted in smaller prefix matching than intended. --- src/modules/rlm_cache/rlm_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rlm_cache/rlm_cache.c b/src/modules/rlm_cache/rlm_cache.c index a24c4fdc455e2..dba38691013ea 100644 --- a/src/modules/rlm_cache/rlm_cache.c +++ b/src/modules/rlm_cache/rlm_cache.c @@ -942,7 +942,7 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf) /* * Sanity check for crazy people. */ - if (strncmp(inst->config.driver_name, "rlm_cache_", 8) != 0) { + if (strncmp(inst->config.driver_name, "rlm_cache_", 10) != 0) { cf_log_err(conf, "\"%s\" is NOT an Cache driver!", inst->config.driver_name); return -1; }