You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid memory leak associated with symmetric init (#376)
The `NativeInterface.CIPHER_init` method initializes a given context
such that it is ready to perform encryption and decryption for a given
Cipher.
As part of the initialization method a `ockCipher->cached_context` can
be optionally created in addition to the context being used. While
allocating the `ockCipher->cached_context` the logic did not account for
any previously created contexts that were previously stored in the
`ockCipher->cached_context` location. This caused a leak of context
objects for each initialization done on objects that already contained a
context.
Additional error checking was done for the calls to
`ICC_EVP_CIPHER_CTX_new` and `ICC_EVP_CIPHER_CTX_copy` to ensure that
the method worked as expected.
Signed-off-by: Jason Katonica <katonica@us.ibm.com>
0 commit comments