summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/mk_rep.c
diff options
context:
space:
mode:
authorassar <assar@FreeBSD.org>2001-06-21 02:12:07 +0000
committerassar <assar@FreeBSD.org>2001-06-21 02:12:07 +0000
commit0c8fa354358381b3f1b92598e7f1b46f8cf744cc (patch)
treeed28ffb73cc0ae48a9892dab3f10b09bc36436d5 /crypto/heimdal/lib/krb5/mk_rep.c
parent06c859ecf534f468a52f24a3eb14409d73a4907c (diff)
downloadFreeBSD-src-0c8fa354358381b3f1b92598e7f1b46f8cf744cc.zip
FreeBSD-src-0c8fa354358381b3f1b92598e7f1b46f8cf744cc.tar.gz
import of heimdal 0.3f
Diffstat (limited to 'crypto/heimdal/lib/krb5/mk_rep.c')
-rw-r--r--crypto/heimdal/lib/krb5/mk_rep.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/heimdal/lib/krb5/mk_rep.c b/crypto/heimdal/lib/krb5/mk_rep.c
index ad750b0..fc6b4f2 100644
--- a/crypto/heimdal/lib/krb5/mk_rep.c
+++ b/crypto/heimdal/lib/krb5/mk_rep.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 - 2000 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: mk_rep.c,v 1.18 2000/12/06 20:57:23 joda Exp $");
+RCSID("$Id: mk_rep.c,v 1.19 2001/05/14 06:14:49 assar Exp $");
krb5_error_code
krb5_mk_rep(krb5_context context,
@@ -61,8 +61,10 @@ krb5_mk_rep(krb5_context context,
auth_context->keyblock,
&auth_context->local_seqnumber);
body.seq_number = malloc (sizeof(*body.seq_number));
- if (body.seq_number == NULL)
+ if (body.seq_number == NULL) {
+ krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
+ }
*(body.seq_number) = auth_context->local_seqnumber;
} else
body.seq_number = NULL;
@@ -74,6 +76,7 @@ krb5_mk_rep(krb5_context context,
buf = malloc (buf_size);
if (buf == NULL) {
free_EncAPRepPart (&body);
+ krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
@@ -106,6 +109,7 @@ krb5_mk_rep(krb5_context context,
buf = realloc(buf, buf_size);
if(buf == NULL) {
free_AP_REP (&ap);
+ krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
ret = encode_AP_REP (buf + buf_size - 1, buf_size, &ap, &len);
OpenPOWER on IntegriCloud