**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', '')
```
ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {0}; }
    bool useDefaultImplementationForConstants() const override { return true; }
    DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override
    {
        auto optional_args = FunctionArgumentDescriptors{
            {"IV", isStringOrFixedString, nullptr, "Initialization vector binary string"},
        };
        if constexpr (compatibility_mode == OpenSSLDetails::CompatibilityMode::OpenSSL)
        {
            optional_args.emplace_back(FunctionArgumentDescriptor{
                "AAD", isStringOrFixedString, nullptr, "Additional authenticated data binary string for GCM mode"
            });
        }
        validateFunctionArgumentTypes(*this, arguments,
            FunctionArgumentDescriptors{
                {"mode", isStringOrFixedString, isColumnConst, "encryption mode string"},
                {"input", nullptr, nullptr, "plaintext"},
                {"key", isStringOrFixedString, nullptr, "encryption key binary string"},
            },
            optional_args
        );
        return std::make_shared<DataTypeString>();
    }
    ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
    {
        using namespace OpenSSLDetails;
        const auto mode = arguments[0].column->getDataAt(0);
        if (mode.size == 0 || !std::string_view(mode).starts_with("aes-"))
            throw Exception("Invalid mode: " + mode.toString(), ErrorCodes::BAD_ARGUMENTS);
        const auto * evp_cipher = getCipherByName(mode);