diff options
author | Greg Hudson <ghudson@mit.edu> | 2009-10-06 16:36:34 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2009-10-06 16:36:34 +0000 |
commit | af272eb06c753ca9244768e11ae01aa10f21a9c7 (patch) | |
tree | 45c77c724341848689b6dc6586532b0c7436d5b5 | |
parent | 8537a4edfaabb5fbd4a0ea579124361731035e0f (diff) | |
download | krb5-af272eb06c753ca9244768e11ae01aa10f21a9c7.tar.gz krb5-af272eb06c753ca9244768e11ae01aa10f21a9c7.tar.xz krb5-af272eb06c753ca9244768e11ae01aa10f21a9c7.zip |
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.c | 2 |
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 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); |