Skip to content

Commit

Permalink
Fix rlm_cache_ sanity check for crazy people (FreeRADIUS#3370)
Browse files Browse the repository at this point in the history
This PR fixes an incorrect size argument passed to `strncmp` which resulted in smaller prefix matching than intended.
  • Loading branch information
disconnect3d authored and stephenmac98 committed Apr 14, 2020
1 parent 00f02d4 commit 80ee948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/rlm_cache/rlm_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 80ee948

Please sign in to comment.