]> granicus.if.org Git - sudo/commitdiff
trat uid_t as unsigned long for printf and use snprintf, not sprintf
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 16 Mar 2003 02:18:57 +0000 (02:18 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 16 Mar 2003 02:18:57 +0000 (02:18 +0000)
auth/kerb4.c

index bcef0fbf6317fec8d6ba92c38726824e7ba8837d..663521bc742d80a4f0777fbb0f1a2d10eba8aa66 100644 (file)
@@ -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. */