summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/decode_kdc.c
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-04-17 17:39:53 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-04-17 17:39:53 +0000
commit1487a085f13a51e55f6a346338f8f3c002516613 (patch)
tree3f06defba18f2defa62c2f5e29b86d2feaf1edca /src/lib/krb5/krb/decode_kdc.c
parent4cf3e69cdbc6b8050f0d9637f0f58f18758a73bf (diff)
downloadkrb5-1487a085f13a51e55f6a346338f8f3c002516613.tar.gz
krb5-1487a085f13a51e55f6a346338f8f3c002516613.tar.xz
krb5-1487a085f13a51e55f6a346338f8f3c002516613.zip
check msg type before decoding
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@483 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/decode_kdc.c')
-rw-r--r--src/lib/krb5/krb/decode_kdc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/decode_kdc.c b/src/lib/krb5/krb/decode_kdc.c
index b30d233302..f01600c5b4 100644
--- a/src/lib/krb5/krb/decode_kdc.c
+++ b/src/lib/krb5/krb/decode_kdc.c
@@ -54,6 +54,8 @@ OLDDECLARG(krb5_kdc_rep **, dec_rep)
/* XXX maybe caller should specify type expected? */
+ if (!krb5_is_kdc_rep(enc_rep))
+ return KRB5KRB_AP_ERR_MSG_TYPE;
retval = decode_krb5_as_rep(enc_rep, &local_dec_rep);
switch (retval) {
case ISODE_50_LOCAL_ERR_BADMSGTYPE: