[1127] in Kerberos-V5-bugs
krb5/ccache/file uninitialized error variables...
daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Fri Mar 10 10:13:04 1995
From: epeisach@MIT.EDU
Date: Fri, 10 Mar 1995 10:12:29 -0500
To: krb5-bugs@MIT.EDU
I was discussing this with Chris yesterday... He pointed out the missing
ref in the destroy and init routines... I am initializing the values to
0 because MAYBE_CLOSE tests against !0 - KRB5_OK is currently zero, but
I don't want any assumptions... One could change the zeor to the KRB5_OK
and still get away with it I think....
The other entry: fcc_maybe.c - the is a pathway for the error routine to
fall through and return whatever was on the stack.. It has not hit yet,
but it might... (if POSIX_FILE_LOCKS and HAVE_FLOCK is not not defined).
Ezra
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/ccache/file/fcc_destry.c,v
retrieving revision 5.22
diff -c -r5.22 fcc_destry.c
*** 5.22 1995/03/08 01:03:26
--- fcc_destry.c 1995/03/10 03:04:06
***************
*** 44,50 ****
unsigned int wlen;
char zeros[BUFSIZ];
register int ret;
! krb5_error_code kret;
if (OPENCLOSE(id)) {
--- 44,50 ----
unsigned int wlen;
char zeros[BUFSIZ];
register int ret;
! krb5_error_code kret = 0;
if (OPENCLOSE(id)) {
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/ccache/file/fcc_init.c,v
retrieving revision 5.17
diff -c -r5.17 fcc_init.c
*** 5.17 1995/03/08 01:03:39
--- fcc_init.c 1995/03/10 03:03:21
***************
*** 46,52 ****
krb5_ccache id;
krb5_principal princ;
{
! krb5_error_code kret;
int reti;
MAYBE_OPEN(context, id, FCC_OPEN_AND_ERASE);
--- 46,52 ----
krb5_ccache id;
krb5_principal princ;
{
! krb5_error_code kret = 0;
int reti;
MAYBE_OPEN(context, id, FCC_OPEN_AND_ERASE);
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/ccache/file/fcc_maybe.c,v
retrieving revision 5.18
diff -c -r5.18 fcc_maybe.c
*** 5.18 1995/03/08 01:03:42
--- fcc_maybe.c 1995/03/10 15:01:38
***************
*** 168,174 ****
int fd;
int lockunlock;
{
! krb5_error_code st;
#ifdef POSIX_FILE_LOCKS
st = fcc_lock_file_posix(data, fd, lockunlock);
if (st != EINVAL) {
--- 168,174 ----
int fd;
int lockunlock;
{
! krb5_error_code st = 0;
#ifdef POSIX_FILE_LOCKS
st = fcc_lock_file_posix(data, fd, lockunlock);
if (st != EINVAL) {