From af272eb06c753ca9244768e11ae01aa10f21a9c7 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 6 Oct 2009 16:36:34 +0000 Subject: [PATCH] In krb5_encrypt_helper, return ENOMEM instead of 0 if we can't allocate the ciphertext buffer. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22860 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/enc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/enc_helper.c b/src/lib/krb5/krb/enc_helper.c index 63e3495da..34aa612d6 100644 --- a/src/lib/krb5/krb/enc_helper.c +++ b/src/lib/krb5/krb/enc_helper.c @@ -38,7 +38,7 @@ krb5_encrypt_helper(krb5_context context, const krb5_keyblock *key, krb5_keyusag cipher->ciphertext.length = enclen; if ((cipher->ciphertext.data = (char *) malloc(enclen)) == NULL) - return(ret); + return(ENOMEM); ret = krb5_c_encrypt(context, key, usage, 0, plain, cipher); if (ret) { free(cipher->ciphertext.data); -- 2.26.2