projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31670c9
)
Check that OPENSSL_malloc() really returned some memory.
author
Richard Levitte
<levitte@openssl.org>
Mon, 1 Dec 2003 12:11:57 +0000
(12:11 +0000)
committer
Richard Levitte
<levitte@openssl.org>
Mon, 1 Dec 2003 12:11:57 +0000
(12:11 +0000)
PR: 751
Notified by: meder@mcs.anl.gov
Reviewed by: Lutz Jaenicke, Richard Levitte
crypto/evp/evp_enc.c
patch
|
blob
|
history
diff --git
a/crypto/evp/evp_enc.c
b/crypto/evp/evp_enc.c
index be0758a87965feeb7b0c0494c3002213cd5571e9..e42e97284475deccf9a837923f4cfe212ed11afa 100644
(file)
--- a/
crypto/evp/evp_enc.c
+++ b/
crypto/evp/evp_enc.c
@@
-149,6
+149,11
@@
int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
ctx->cipher=cipher;
ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
+ if (!ctx->cipher_data)
+ {
+ EVPerr(EVP_F_EVP_CIPHERINIT, ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
ctx->key_len = cipher->key_len;
ctx->flags = 0;
if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)