wgtmac commented on code in PR #50036:
URL: https://github.com/apache/arrow/pull/50036#discussion_r3314979527
##########
cpp/src/parquet/geospatial/util_internal.cc:
##########
@@ -64,7 +64,7 @@ class WKBBuffer {
template <typename Coord, typename Visit>
void ReadCoords(uint32_t n_coords, bool swap, Visit&& visit) {
- size_t total_bytes = n_coords * sizeof(Coord);
+ uint64_t total_bytes = static_cast<uint64_t>(n_coords) * sizeof(Coord);
Review Comment:
Should we use `MultiplyWithOverflow` instead? Current multiplication can
still overflow in some extreme cases.
--
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]