From cfd3d8dbd6c0f3270427bc3172f84a0562a06593 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sun, 13 May 2012 15:42:50 -0400 Subject: [PATCH] Check alloc_data result in krb5int_old_encrypt --- src/lib/crypto/krb/enc_old.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.26.2