fix logic errors
authorSam Hartman <hartmans@mit.edu>
Sat, 4 Apr 2009 03:03:04 +0000 (03:03 +0000)
committerSam Hartman <hartmans@mit.edu>
Sat, 4 Apr 2009 03:03:04 +0000 (03:03 +0000)
ticket: 6436

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22170 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/fast_util.c
src/lib/krb5/krb/get_in_tkt.c

index ac6aa22c48c9102f688a270ccf76e5faf79d9624..6ced4c7e677c34de0f7f8bc2e0a3b5504c6cac82 100644 (file)
@@ -211,7 +211,7 @@ krb5_error_code  kdc_find_fast
     else cookie_padata = find_pa_data(request->padata, KRB5_PADATA_FX_COOKIE);
         if (retval == 0 && cookie_padata != NULL) {
        krb5_pa_data *new_padata = malloc(sizeof (krb5_pa_data));
-       if (new_padata != NULL) {
+       if (new_padata == NULL) {
            retval = ENOMEM;
        } else {
            new_padata->pa_type = KRB5_PADATA_FX_COOKIE;
index 2944652ffc63bc1efe545e150d6756c5dfe605a7..e6c4434c299c7d36644ecb25785a53beeaaa738b 100644 (file)
@@ -1472,7 +1472,7 @@ krb5_get_init_creds(krb5_context context,
        if (ret)
          goto cleanup;
        if ((ret = decrypt_as_reply(context, NULL, local_as_reply, NULL,
-                                   NULL, &as_key, krb5_kdc_rep_decrypt_proc,
+                                   NULL, &encrypting_key, krb5_kdc_rep_decrypt_proc,
                                    NULL)))
            goto cleanup;
     }