[krbdev.mit.edu #6434] krb5_cc_resolve() will crash if a null name param is provided

Jeffrey Altman via RT rt-comment at krbdev.mit.edu
Wed Mar 25 23:48:22 EDT 2009


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);





More information about the krb5-bugs mailing list