aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-10-06 16:36:34 +0000
committerGreg Hudson <ghudson@mit.edu>2009-10-06 16:36:34 +0000
commitaf272eb06c753ca9244768e11ae01aa10f21a9c7 (patch)
tree45c77c724341848689b6dc6586532b0c7436d5b5
parent8537a4edfaabb5fbd4a0ea579124361731035e0f (diff)
downloadkrb5-af272eb06c753ca9244768e11ae01aa10f21a9c7.zip
krb5-af272eb06c753ca9244768e11ae01aa10f21a9c7.tar.gz
krb5-af272eb06c753ca9244768e11ae01aa10f21a9c7.tar.bz2
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
-rw-r--r--src/lib/krb5/krb/enc_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/enc_helper.c b/src/lib/krb5/krb/enc_helper.c
index 63e3495..34aa612 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);