Closed miranovy closed 3 years ago
@miranovy thanks for your contribution, will you help to add a test case for it or a minimal case that we can reproduce it in our side.
I added small allocation test. The error is not reflected in short texts, but only when decprypting large files on fly when calling EVP_DecryptUpdate repeatedly.
There was a segmentation fault while decoding because the wrong size buffer was allocated.
I fixed the buffer size according to the documentation https://www.openssl.org/docs/man1.1.0/man3/EVP_EncryptInit.html for encrypt and decrypt.