You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "adamreeve (via GitHub)" <gi...@apache.org> on 2024/07/03 04:03:38 UTC
Re: [PR] GH-43070: [C++][Parquet] Check for valid ciphertext length to prevent segfault [arrow]
adamreeve commented on PR #43071:
URL: https://github.com/apache/arrow/pull/43071#issuecomment-2205054812
@pitrou, I think I've addressed all of your comments now thank you
* I've added extra validation of the buffer sizes in various places
* I've switched from raw pointers to `arrow::util::span`
* The ciphertext size is no longer optional, although it's no longer checked for an exact match, the actual ciphertext length might be less than the buffer size
* I've pulled out the length reading and validation into a shared method
* I've refactored how the plaintext/ciphertext length conversions are handled by adding methods for these rather than adding or subtracting the size delta in consumer code
I haven't touched the `AesEncryptor` API at all, but it would probably make sense to follow up after this to at least change that to use `arrow::util::span` too for consistency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org