Skip to content

Commit

Permalink
Check alloc_data result in krb5int_old_encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
greghudson committed May 13, 2012
1 parent 6b08214 commit cfd3d8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/crypto/krb/enc_old.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cfd3d8d

Please sign in to comment.