patch-gnats_mk_auth_c 590 B

12345678910111213
  1. $OpenBSD: patch-gnats_mk_auth_c,v 1.2 2007/12/28 17:11:25 espie Exp $
  2. --- gnats/mk_auth.c.orig Thu Nov 5 20:54:10 1998
  3. +++ gnats/mk_auth.c Fri Dec 28 18:00:24 2007
  4. @@ -140,7 +140,7 @@ krb_mk_auth(options, ticket, service, inst, realm, che
  5. #ifdef ATHENA_COMPAT
  6. /* this is only for compatibility with old servers */
  7. if (options & KOPT_DO_OLDSTYLE) {
  8. - (void) sprintf(buf->dat,"%d ",ticket->length);
  9. + (void) snprintf(buf->dat, sizeof(buf->dat), "%d ", ticket->length);
  10. (void) write(fd, buf, strlen(buf));
  11. (void) write(fd, (char *) ticket->dat, ticket->length);
  12. return(rem);