[krbdev.mit.edu #5980] krb5_cc_default_name() can return NULL, but is passed directly to strcmp() (causing crash)

Jeffrey Altman via RT rt-comment at krbdev.mit.edu
Mon Jul 21 13:51:45 EDT 2008


From: jaltman at mit.edu
Subject: SVN Commit


ccdefault.c:
krb5_cc_default_name() is permitted to return a NULL
pointer as a valid output.  Passing a NULL pointer to
strcmp() will result in an exception as NULL is not
a valid input parameter to strcmp().

Save the output of krb5_cc_default_name() to a variable
and modify the conditional to set the new default ccache
name in the case where there is no existing default
ccache name.


Commit By: jaltman



Revision: 20551
Changed Files:
U   trunk/src/lib/krb5/ccache/ccdefault.c



More information about the krb5-bugs mailing list