From 72ffc473b79180c38918d2e8e46f8f6707e35628 Mon Sep 17 00:00:00 2001 From: kangenbo Date: Sat, 11 Jan 2020 13:04:09 +0800 Subject: Limit number of comparison characters to 4 Replace the function strcasecmp with strncasecmp --- warnquota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warnquota.c b/warnquota.c index 5158094..daa29d9 100644 --- a/warnquota.c +++ b/warnquota.c @@ -843,7 +843,7 @@ cc_parse_err: } #ifdef USE_LDAP_MAIL_LOOKUP else if (!strcmp(var, "LDAP_MAIL")) { - if(strcasecmp(value, "true") == 0) + if(strncasecmp(value, "true", 4) == 0) config->use_ldap_mail = 1; else config->use_ldap_mail = 0; -- 1.8.3.1