pitrou commented on code in PR #43413:
URL: https://github.com/apache/arrow/pull/43413#discussion_r1722944331
##########
cpp/src/parquet/encryption/encryption_internal.cc:
##########
@@ -758,9 +795,14 @@ void QuickUpdatePageAad(int32_t new_page_ordinal,
std::string* AAD) {
std::memcpy(AAD->data() + AAD->length() - 2, page_ordinal_bytes.data(), 2);
}
-void RandBytes(unsigned char* buf, int num) {
+void RandBytes(unsigned char* buf, size_t num) {
+ if (num > static_cast<size_t>(std::numeric_limits<int>::max())) {
Review Comment:
Note we could easily call `RAND_bytes` in a loop, but we don't have a use
case for generating cryptographic random data that large anyway.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]