From: Greg Hudson Date: Tue, 6 Oct 2009 16:36:34 +0000 (+0000) Subject: In krb5_encrypt_helper, return ENOMEM instead of 0 if we can't X-Git-Tag: krb5-1.8-alpha1~317 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af272eb06c753ca9244768e11ae01aa10f21a9c7;p=krb5.git 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 --- 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);