You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/04 14:50:27 UTC
[GitHub] [arrow] lidavidm commented on a diff in pull request #13532: ARROW-16778: [C++] Fix win32 build and tests
lidavidm commented on code in PR #13532:
URL: https://github.com/apache/arrow/pull/13532#discussion_r937864769
##########
cpp/src/arrow/ipc/message.cc:
##########
@@ -913,9 +913,9 @@ class MessageDecoder::MessageDecoderImpl {
auto data = chunk->data();
auto data_size = chunk->size();
auto copy_size = std::min(required_size, data_size);
- memcpy(static_cast<uint8_t*>(out) + offset, data, copy_size);
+ memcpy(static_cast<uint8_t*>(out) + offset, data, static_cast<size_t>(copy_size));
Review Comment:
It feels like _somewhere_ in this file, there should be an overflow check when we read/parse a message. Or maybe that's handled by Flatbuffers?
##########
cpp/src/arrow/util/future.cc:
##########
@@ -214,7 +214,8 @@ bool FutureImpl::TryAddCallback(const std::function<Callback()>& callback_factor
Future<> AllComplete(const std::vector<Future<>>& futures) {
struct State {
- explicit State(int64_t n_futures) : mutex(), n_remaining(n_futures) {}
+ explicit State(int64_t n_futures)
Review Comment:
nit: just change the type of the argument instead?
--
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