Missed a sprintf->snprintf switch
authorKen Raeburn <raeburn@mit.edu>
Thu, 12 Jul 2007 23:34:41 +0000 (23:34 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 12 Jul 2007 23:34:41 +0000 (23:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19706 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb4/mk_auth.c

index cf85ea2f87c8a07e6071a9c331f9ed7416a5d5a8..e09e900761997df425846e0fa80a863d93bdca15 100644 (file)
@@ -159,7 +159,7 @@ krb_mk_auth(options, ticket, service, inst, realm, checksum, version, buf)
 #ifdef ATHENA_COMPAT
     /* this is only for compatibility with old servers */
     if (options & KOPT_DO_OLDSTYLE) {
-       (void) sprintf(buf->dat,"%d ",ticket->length);
+       (void) snprintf(buf->dat, sizeof(buf->dat), "%d ",ticket->length);
        (void) write(fd, buf, strlen(buf));
        (void) write(fd, (char *) ticket->dat, ticket->length);
        return(rem);