From: Todd C. Miller Date: Sun, 16 Mar 2003 02:18:34 +0000 (+0000) Subject: use snprintf X-Git-Tag: SUDO_1_6_7~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc39c565020eeb51176593806ec200533a9b594a;p=sudo use snprintf --- diff --git a/auth/rfc1938.c b/auth/rfc1938.c index 64dd8f30b..eaf58f04e 100644 --- a/auth/rfc1938.c +++ b/auth/rfc1938.c @@ -137,10 +137,10 @@ rfc1938_setup(pw, promptp, auth) } if (def_flag(I_LONG_OTP_PROMPT)) - (void) sprintf(new_prompt, "%s\n%s", challenge, orig_prompt); + (void) snprintf(new_prompt, np_size, "%s\n%s", challenge, orig_prompt); else - (void) sprintf(new_prompt, "%.*s [ %s ]:", op_len, orig_prompt, - challenge); + (void) snprintf(new_prompt, np_size, "%.*s [ %s ]:", op_len, + orig_prompt, challenge); *promptp = new_prompt; return(AUTH_SUCCESS);