/* now decode the reply...could be error or as_rep */
+ if (!krb5_is_kdc_rep(&reply))
+ return KRB5KRB_AP_ERR_MSG_TYPE;
if (retval = decode_krb5_as_rep(&reply, &as_reply)) {
if (decode_krb5_error(&reply, &err_reply))
return retval; /* some other reply--??? */
#include <krb5/krb5.h>
#include <krb5/asn1.h>
+#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
krb5_error_code retval;
krb5_error *new_dec_error;
+ if (!krb5_is_krb_error(enc_errbuf))
+ return KRB5KRB_AP_ERR_MSG_TYPE;
if (retval = decode_krb5_error(enc_errbuf, &new_dec_error))
return(retval);
*dec_error = *new_dec_error;