summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/rd_rep.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/krb5/rd_rep.c')
-rw-r--r--crypto/heimdal/lib/krb5/rd_rep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/heimdal/lib/krb5/rd_rep.c b/crypto/heimdal/lib/krb5/rd_rep.c
index 20f2033..7462b3d 100644
--- a/crypto/heimdal/lib/krb5/rd_rep.c
+++ b/crypto/heimdal/lib/krb5/rd_rep.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#include <krb5_locl.h>
-RCSID("$Id: rd_rep.c,v 1.20 2000/08/18 06:49:03 assar Exp $");
+RCSID("$Id: rd_rep.c,v 1.21 2001/05/14 06:14:50 assar Exp $");
krb5_error_code
krb5_rd_rep(krb5_context context,
@@ -55,10 +55,12 @@ krb5_rd_rep(krb5_context context,
return ret;
if (ap_rep.pvno != 5) {
ret = KRB5KRB_AP_ERR_BADVERSION;
+ krb5_clear_error_string (context);
goto out;
}
if (ap_rep.msg_type != krb_ap_rep) {
ret = KRB5KRB_AP_ERR_MSG_TYPE;
+ krb5_clear_error_string (context);
goto out;
}
@@ -77,6 +79,7 @@ krb5_rd_rep(krb5_context context,
*repl = malloc(sizeof(**repl));
if (*repl == NULL) {
ret = ENOMEM;
+ krb5_set_error_string (context, "malloc: out of memory");
goto out;
}
ret = krb5_decode_EncAPRepPart(context,
@@ -90,6 +93,7 @@ krb5_rd_rep(krb5_context context,
if ((*repl)->ctime != auth_context->authenticator->ctime ||
(*repl)->cusec != auth_context->authenticator->cusec) {
ret = KRB5KRB_AP_ERR_MUT_FAIL;
+ krb5_clear_error_string (context);
goto out;
}
if ((*repl)->seq_number)
OpenPOWER on IntegriCloud