projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b08214
)
Check alloc_data result in krb5int_old_encrypt
author
Greg Hudson
<ghudson@mit.edu>
Sun, 13 May 2012 19:42:50 +0000
(15:42 -0400)
committer
Greg Hudson
<ghudson@mit.edu>
Sun, 13 May 2012 19:42:50 +0000
(15:42 -0400)
src/lib/crypto/krb/enc_old.c
patch
|
blob
|
history
diff --git
a/src/lib/crypto/krb/enc_old.c
b/src/lib/crypto/krb/enc_old.c
index f33cacb5c4c6b129b2a33d13b577c8b8ea578b9a..e7160b16928749d5008d79cb0bb13560678fa137 100644
(file)
--- 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;
}