cyb70289 commented on a change in pull request #11600: URL: https://github.com/apache/arrow/pull/11600#discussion_r742652288
########## File path: cpp/src/arrow/ipc/read_write_test.cc ########## @@ -2565,11 +2565,14 @@ void GetReadRecordBatchReadRanges( const int32_t magic_size = static_cast<int>(strlen(ipc::internal::kArrowMagicBytes)); // read magic and footer length IO auto file_end_size = magic_size + sizeof(int32_t); + auto footer_length_offset = buffer->size() - file_end_size; + auto footer_length = BitUtil::FromLittleEndian( + *reinterpret_cast<const int32_t*>(buffer->data() + footer_length_offset)); Review comment: use `util::SafeLoadAs`? -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org