Subject: | krb5_cc_resolve() will crash if a null name param is provided |
Proposed fix:
Index: ccache/ccbase.c
===================================================================
--- ccache/ccbase.c (revision 22114)
+++ ccache/ccbase.c (working copy)
@@ -181,7 +181,7 @@
const krb5_cc_ops *ops;
pfx = NULL;
- cp = strchr (name, ':');
+ cp = name ? strchr (name, ':') : NULL;
if (!cp) {
if (krb5_cc_dfl_ops)
return (*krb5_cc_dfl_ops->resolve)(context, cache, name);
Index: ccache/ccbase.c
===================================================================
--- ccache/ccbase.c (revision 22114)
+++ ccache/ccbase.c (working copy)
@@ -181,7 +181,7 @@
const krb5_cc_ops *ops;
pfx = NULL;
- cp = strchr (name, ':');
+ cp = name ? strchr (name, ':') : NULL;
if (!cp) {
if (krb5_cc_dfl_ops)
return (*krb5_cc_dfl_ops->resolve)(context, cache, name);