diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-05-13 15:42:50 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-05-13 15:42:50 -0400 |
commit | cfd3d8dbd6c0f3270427bc3172f84a0562a06593 (patch) | |
tree | a5b9bf15cf240751dc34f2c82e11cb354220b9bc /src/lib/crypto | |
parent | 6b0821452898d17058b4d3ac996cd50458b9fbed (diff) | |
download | krb5-cfd3d8dbd6c0f3270427bc3172f84a0562a06593.tar.gz krb5-cfd3d8dbd6c0f3270427bc3172f84a0562a06593.tar.xz krb5-cfd3d8dbd6c0f3270427bc3172f84a0562a06593.zip |
Check alloc_data result in krb5int_old_encrypt
Diffstat (limited to 'src/lib/crypto')
-rw-r--r-- | src/lib/crypto/krb/enc_old.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/crypto/krb/enc_old.c b/src/lib/crypto/krb/enc_old.c index f33cacb5c..e7160b169 100644 --- a/src/lib/crypto/krb/enc_old.c +++ b/src/lib/crypto/krb/enc_old.c @@ -104,6 +104,8 @@ krb5int_old_encrypt(const struct krb5_keytypes *ktp, krb5_key key, /* Use the key as the ivec for des-cbc-crc if none was provided. */ if (key->keyblock.enctype == ENCTYPE_DES_CBC_CRC && ivec == NULL) { ret = alloc_data(&crcivec, key->keyblock.length); + if (ret != 0) + goto cleanup; memcpy(crcivec.data, key->keyblock.contents, key->keyblock.length); ivec = &crcivec; } |