diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-05-04 22:57:42 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-05-04 23:02:50 +0300 |
commit | fba4c338569d27f72ba53d5cbaea0bd989c02748 (patch) | |
tree | 6a74574ca3e79defc443f98a6bdc7e5f5b8770ec /gost_grasshopper_cipher.c | |
parent | 2ed83791d5698106d57febd9fb7dfa40b1b081b8 (diff) | |
download | gost-engine-fba4c338569d27f72ba53d5cbaea0bd989c02748.zip gost-engine-fba4c338569d27f72ba53d5cbaea0bd989c02748.tar.gz gost-engine-fba4c338569d27f72ba53d5cbaea0bd989c02748.tar.bz2 |
Fix coverity issue 300457
Diffstat (limited to 'gost_grasshopper_cipher.c')
-rw-r--r-- | gost_grasshopper_cipher.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index ceafa41..f0419e3 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -584,6 +584,10 @@ int gost_grasshopper_cipher_do_ctracpkm_omac(EVP_CIPHER_CTX *ctx, return gost2015_final_call(ctx, c->omac_ctx, KUZNYECHIK_MAC_MAX_SIZE, c->tag, gost_grasshopper_cipher_do_ctracpkm); } + if (in == NULL) { + GOSTerr(GOST_F_GOST_GRASSHOPPER_CIPHER_DO_CTRACPKM_OMAC, ERR_R_EVP_LIB); + return -1; + } result = gost_grasshopper_cipher_do_ctracpkm(ctx, out, in, inl); /* As in and out can be the same pointer, process decrypted here */ |