**Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/19372/0a155ee2f150d1aaed2c223ea7ec7bb816132ce5/fuzzer_msan/server.log

**How to reproduce**
```
SELECT encrypt('aes-128-cbc', 'text', 'keykeykeykeykeyk', '')
```
int tmp_len = 0;
                        if (aad_data.size != 0 && EVP_EncryptUpdate(evp_ctx, nullptr, &tmp_len,
                                reinterpret_cast<const unsigned char *>(aad_data.data), aad_data.size) != 1)
                            onError("Failed to set AAD data");
                    }
                }
                else
                {
                    
                    validateIV<mode>(iv_value, iv_size);
                    if (EVP_EncryptInit_ex(evp_ctx, evp_cipher, nullptr,
                            reinterpret_cast<const unsigned char*>(key_value.data),
                            reinterpret_cast<const unsigned char*>(iv_value.data)) != 1)
                        onError("Failed to initialize cipher context");
                }
                int output_len = 0;
                
                if (EVP_EncryptUpdate(evp_ctx,
                        reinterpret_cast<unsigned char*>(encrypted), &output_len,
                        reinterpret_cast<const unsigned char*>(input_value.data), static_cast<int>(input_value.size)) != 1)
                    onError("Failed to encrypt");
                encrypted += output_len;
                
                if (EVP_EncryptFinal_ex(evp_ctx,
                        reinterpret_cast<unsigned char*>(encrypted), &output_len) != 1)
                    onError("Failed to fetch ciphertext");
                encrypted += output_len;
                
                
                if constexpr (mode == CipherMode::RFC5116_AEAD_AES_GCM)