projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Coverity CID 1444952: Null pointer dereferences
[openssl.git]
/
crypto
/
evp
/
evp_enc.c
diff --git
a/crypto/evp/evp_enc.c
b/crypto/evp/evp_enc.c
index 44d88a1f048b1de1bf16eb445d90d3f50bccb797..4bc63703254f841005f43c592df7ef5b11a23489 100644
(file)
--- a/
crypto/evp/evp_enc.c
+++ b/
crypto/evp/evp_enc.c
@@
-843,6
+843,10
@@
int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
legacy:
*outl = 0;
+ if (ctx->cipher == NULL) {
+ EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_NO_CIPHER_SET);
+ return 0;
+ }
if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {
i = ctx->cipher->do_cipher(ctx, out, NULL, 0);