**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', '')
```
const auto * evp_cipher = getCipherByName(mode);
        if (evp_cipher == nullptr)
            throw Exception("Invalid mode: " + mode.toString(), ErrorCodes::BAD_ARGUMENTS);
        OpenSSLDetails::validateCipherMode<compatibility_mode>(evp_cipher);
        const auto input_column = arguments[1].column;
        const auto key_column = arguments[2].column;
        ColumnPtr result_column;
        if (arguments.size() <= 3)
            result_column = doDecrypt(evp_cipher, input_rows_count, input_column, key_column, nullptr, nullptr);
        else
        {
            const auto iv_column = arguments[3].column;
            if (compatibility_mode != OpenSSLDetails::CompatibilityMode::MySQL && EVP_CIPHER_iv_length(evp_cipher) == 0)
                throw Exception(mode.toString() + " does not support IV", ErrorCodes::BAD_ARGUMENTS);
            if (arguments.size() <= 4)
            {
                result_column = doDecrypt(evp_cipher, input_rows_count, input_column, key_column, iv_column, nullptr);
            }
            else
            {
                if (EVP_CIPHER_mode(evp_cipher) != EVP_CIPH_GCM_MODE)
                    throw Exception("AAD can be only set for GCM-mode", ErrorCodes::BAD_ARGUMENTS);
                const auto aad_column = arguments[4].column;
                result_column = doDecrypt(evp_cipher, input_rows_count, input_column, key_column, iv_column, aad_column);
            }
        }
        return result_column;
    }
    template <typename InputColumnType, typename KeyColumnType, typename IvColumnType, typename AadColumnType>
    static ColumnPtr doDecrypt(const EVP_CIPHER * evp_cipher,