X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_grasshopper_cipher.c;h=a482a39cf0728ea2bf75746109cfe8aa85708293;hb=f72fe5c4cfaa5130d0afb5174eb272bac01a912a;hp=e78fae747db56dca65fc677e00a7b4d27425afbd;hpb=ae390d45207aadb69eb96d8c11c1ee888f70815f;p=openssl-gost%2Fengine.git diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index e78fae7..a482a39 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -604,6 +604,10 @@ int gost_grasshopper_cipher_do_cfb(EVP_CIPHER_CTX* ctx, unsigned char* out, int gost_grasshopper_cipher_cleanup(EVP_CIPHER_CTX* ctx) { gost_grasshopper_cipher_ctx* c = (gost_grasshopper_cipher_ctx*) EVP_CIPHER_CTX_get_cipher_data(ctx); + + if (!c) + return 1; + struct GRASSHOPPER_CIPHER_PARAMS* params = &gost_cipher_params[c->type]; gost_grasshopper_cipher_destroy(c);