From bef16d08b47d4100b0438fabf272bfabeb2319d5 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 30 Jun 2000 19:47:24 +0000 Subject: [PATCH] * rc_io.c (krb5_rc_io_creat): Cast getpid() to int. (Use of a long might overflow buffer if pid_t is 64 bits */ git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12480 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/ChangeLog | 5 +++++ src/lib/krb5/rcache/rc_io.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/rcache/ChangeLog b/src/lib/krb5/rcache/ChangeLog index f58e8773a..3bac09193 100644 --- a/src/lib/krb5/rcache/ChangeLog +++ b/src/lib/krb5/rcache/ChangeLog @@ -1,3 +1,8 @@ +2000-06-29 Ezra Peisach + + * rc_io.c (krb5_rc_io_creat): Cast getpid() to int. + (Use of a long might overflow buffer if pid_t is 64 bits */ + 2000-04-28 Nalin Dahyabhai * rc_io.c (getdir): Don't check dirlen again, the call sites diff --git a/src/lib/krb5/rcache/rc_io.c b/src/lib/krb5/rcache/rc_io.c index b4291bcad..3706a66ee 100644 --- a/src/lib/krb5/rcache/rc_io.c +++ b/src/lib/krb5/rcache/rc_io.c @@ -101,7 +101,7 @@ krb5_error_code krb5_rc_io_creat (context, d, fn) if (fn) if (!(*fn = malloc(35))) { FREE(d->fn); return KRB5_RC_IO_MALLOC; } - (void) sprintf(d->fn,"%s%skrb5_RC%d",dir,PATH_SEPARATOR,UNIQUE); + (void) sprintf(d->fn,"%s%skrb5_RC%d",dir,PATH_SEPARATOR, (int) UNIQUE); c = d->fn + strlen(d->fn); (void) strcpy(c,"aaa"); while ((d->fd = THREEPARAMOPEN(d->fn,O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY,0600)) == -1) -- 2.26.2