summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/rd_cred.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-02-19 15:46:56 +0000
committernectar <nectar@FreeBSD.org>2002-02-19 15:46:56 +0000
commit69a91bec14ec3ad49d1c8a82c40a796755f9e4a3 (patch)
tree85ecf91fd00875cec4b93111d3a8ed9eec9cddfe /crypto/heimdal/lib/krb5/rd_cred.c
parent8db4cdb3da4228a5d93635e43825e2e8a2f66db7 (diff)
downloadFreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.zip
FreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.tar.gz
Import of Heimdal Kerberos from KTH repository circa 2002/02/17.
Diffstat (limited to 'crypto/heimdal/lib/krb5/rd_cred.c')
-rw-r--r--crypto/heimdal/lib/krb5/rd_cred.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/heimdal/lib/krb5/rd_cred.c b/crypto/heimdal/lib/krb5/rd_cred.c
index c7729b1..746e2d1 100644
--- a/crypto/heimdal/lib/krb5/rd_cred.c
+++ b/crypto/heimdal/lib/krb5/rd_cred.c
@@ -33,7 +33,7 @@
#include <krb5_locl.h>
-RCSID("$Id: rd_cred.c,v 1.14 2001/05/14 06:14:50 assar Exp $");
+RCSID("$Id: rd_cred.c,v 1.15 2001/06/29 14:53:44 assar Exp $");
krb5_error_code
krb5_rd_cred(krb5_context context,
@@ -181,6 +181,12 @@ krb5_rd_cred(krb5_context context,
*ret_creds = calloc(enc_krb_cred_part.ticket_info.len + 1,
sizeof(**ret_creds));
+ if (*ret_creds == NULL) {
+ ret = ENOMEM;
+ krb5_set_error_string (context, "malloc: out of memory");
+ goto out;
+ }
+
for (i = 0; i < enc_krb_cred_part.ticket_info.len; ++i) {
KrbCredInfo *kci = &enc_krb_cred_part.ticket_info.val[i];
krb5_creds *creds;
OpenPOWER on IntegriCloud