From: Alexandra Ellwood Date: Wed, 25 Jun 2008 20:01:01 +0000 (+0000) Subject: krb5_do_preauth_tryagain should check for NULL padata X-Git-Tag: krb5-1.7-alpha1~635 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=99231291113511ae13720027425aa30a392135dc;p=krb5.git krb5_do_preauth_tryagain should check for NULL padata 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 --- diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index 96df2db04..2ea2533e5 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -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++) {