Skip to content

[C++][Parquet] AesEncryptor::Make should return smart pointer, not a raw pointer #43221

@pitrou

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

Currently, AesEncryptor::Make returns a raw AesEncryptor* and relies on the caller to explicit call delete when done with the instance. This is unsafe, since if an exception is thrown while using the encryptor, it won't be deallocated; not only this is a memory leak, but it might (?) also be a security problem if the corresponding OpenSSL cipher object keeps confidential data around.

Component(s)

C++, Parquet

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions