From: Todd C. Miller Date: Sun, 16 Mar 2003 02:18:57 +0000 (+0000) Subject: trat uid_t as unsigned long for printf and use snprintf, not sprintf X-Git-Tag: SUDO_1_6_7~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2ced184ec331385913ed5bff14b8b405088a7ce;p=sudo trat uid_t as unsigned long for printf and use snprintf, not sprintf --- diff --git a/auth/kerb4.c b/auth/kerb4.c index bcef0fbf6..663521bc7 100644 --- a/auth/kerb4.c +++ b/auth/kerb4.c @@ -101,7 +101,8 @@ kerb4_verify(pw, pass, auth) * Set the ticket file to be in sudo sudo timedir so we don't * wipe out other (real) kerberos tickets. */ - (void) sprintf(tkfile, "%s/tkt%ld", _PATH_SUDO_TIMEDIR, (long) pw->pw_uid); + (void) snprintf(tkfile, sizoef(tkfile), "%s/tkt%lu", + _PATH_SUDO_TIMEDIR, (unsigned long) pw->pw_uid); (void) krb_set_tkt_string(tkfile); /* Convert the password to a ticket given. */