]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use snprintf
authorAlan T. DeKok <aland@freeradius.org>
Sat, 17 Feb 2024 12:07:52 +0000 (07:07 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 17 Feb 2024 12:07:52 +0000 (07:07 -0500)
src/modules/rlm_counter/rlm_counter.c

index ff46aef0c327708efe9fa164ae87794d03aa3b28..9e3c7530cfbb03c8e4a6084ae39ab7571da8cf97 100644 (file)
@@ -839,7 +839,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, REQUEST *reque
                /*
                 * User is denied access, send back a reply message
                */
-               sprintf(msg, "Your maximum %s usage time has been reached", inst->reset);
+               snprintf(msg, sizeof(msg), "Your maximum %s usage time has been reached", inst->reset);
                pair_make_reply("Reply-Message", msg, T_OP_EQ);
 
                REDEBUG("Maximum %s usage time reached", inst->reset);