diff options
author | Tom Yu <tlyu@mit.edu> | 2001-01-30 22:40:54 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2001-01-30 22:40:54 +0000 |
commit | e1b97351c095706ea92d65f5c8e213eebbf623be (patch) | |
tree | 7797f01cfab085ef01dfed8fb213ee315c78e574 /src/lib/krb5/krb | |
parent | efc16493653b4173c54daf40f33e57097d99af81 (diff) | |
download | krb5-e1b97351c095706ea92d65f5c8e213eebbf623be.zip krb5-e1b97351c095706ea92d65f5c8e213eebbf623be.tar.gz krb5-e1b97351c095706ea92d65f5c8e213eebbf623be.tar.bz2 |
* preauth.c (krb5_obtain_padata): Don't dereference a NULL pointer
if we receive an empty ETYPE_INFO preauth. [krb5-libs/903 from
craziboy77@hotmail.com]
* preauth2.c (krb5_do_preauth): Don't dereference a NULL pointer
if we receive an empty ETYPE_INFO preauth. [krb5-libs/903 from
craziboy77@hotmail.com]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12977 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb')
-rw-r--r-- | src/lib/krb5/krb/ChangeLog | 10 | ||||
-rw-r--r-- | src/lib/krb5/krb/preauth.c | 4 | ||||
-rw-r--r-- | src/lib/krb5/krb/preauth2.c | 5 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index d05ca17..8c6f20a 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,13 @@ +2001-01-30 Tom Yu <tlyu@mit.edu> + + * preauth.c (krb5_obtain_padata): Don't dereference a NULL pointer + if we receive an empty ETYPE_INFO preauth. [krb5-libs/903 from + craziboy77@hotmail.com] + + * preauth2.c (krb5_do_preauth): Don't dereference a NULL pointer + if we receive an empty ETYPE_INFO preauth. [krb5-libs/903 from + craziboy77@hotmail.com] + 2001-01-30 Ezra Peisach <epeisach@mit.edu> * rd_req_dec.c (krb5_rd_req_decrypt_tkt_part): Free diff --git a/src/lib/krb5/krb/preauth.c b/src/lib/krb5/krb/preauth.c index 38aa820..54f6a95 100644 --- a/src/lib/krb5/krb/preauth.c +++ b/src/lib/krb5/krb/preauth.c @@ -172,6 +172,10 @@ krb5_error_code krb5_obtain_padata(context, preauth_to_use, key_proc, retval = decode_krb5_etype_info(&scratch, &etype_info); if (retval) return retval; + if (etype_info[0] == NULL) { + krb5_free_etype_info(context, etype_info); + etype_info = NULL; + } } } diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index d384198..a637473 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -530,6 +530,11 @@ krb5_do_preauth(krb5_context context, } return ret; } + if (etype_info[0] == NULL) { + krb5_free_etype_info(context, etype_info); + etype_info = NULL; + break; + } salt->data = (char *) etype_info[0]->salt; salt->length = etype_info[0]->length; *etype = etype_info[0]->etype; |