krb5_do_preauth_tryagain should check for NULL padata
authorAlexandra Ellwood <lxs@mit.edu>
Wed, 25 Jun 2008 20:01:01 +0000 (20:01 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Wed, 25 Jun 2008 20:01:01 +0000 (20:01 +0000)
Fixed so krb5_do_preauth_tryagain no longer crashes on NULL padata but
instead returns an error.

ticket: new
status: open

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

src/lib/krb5/krb/preauth2.c

index 96df2db0421a9f593091d6b4f0263c3ddcf6cd6e..2ea2533e53cd43b7df0a1608b70e85ae07f4d7fd 100644 (file)
@@ -1679,7 +1679,10 @@ krb5_do_preauth_tryagain(krb5_context kcontext,
     if (context == NULL) {
        return KRB5KRB_ERR_GENERIC;
     }
-
+    if (padata == NULL) {
+        return KRB5KRB_ERR_GENERIC;
+    }
+    
     for (i = 0; padata[i] != NULL && padata[i]->pa_type != 0; i++) {
        out_padata = NULL;
        for (j = 0; j < context->n_modules; j++) {