[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in krb5_cc_register ?



Hello,

It looks to me that there is a missing break in krb5_cc_register that could 
lead to dangling pointers and using more memory than necessary.  I'm assuming 
that there is never supposed to be multiple krb5_cc_ops handling the same 
prefix in the context cc_ops list.


--- cache.c     2002/05/08 17:18:02     1.1.1.1
+++ cache.c     2002/05/28 22:18:20
@@ -51,8 +51,10 @@ krb5_cc_register(krb5_context context,

     for(i = 0; i < context->num_cc_ops && context->cc_ops[i].prefix; i++) {
        if(strcmp(context->cc_ops[i].prefix, ops->prefix) == 0) {
-           if(override)
+            if( override ) {
                free(context->cc_ops[i].prefix);
+                break;
+            }
            else {
                krb5_set_error_string(context,
                                      "ccache type %s already exists",

Does that look correct?

Thanks,
Wynn