pitrou opened a new issue, #50971:
URL: https://github.com/apache/arrow/issues/50971

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   The Parquet reader uses disparate types for handling lengths of file 
components: most of the time `int64_t`, but sometimes also `uint32_t` or 
`int32_t` (especially when Thrift deserialization is involved, due to the 
Thrift C++ APIs).
   
   This leads to fragilities and potential issues. This can be seen here:
   
https://github.com/apache/arrow/blob/8b469b179da3bda89d5e8d24c82523553f5aca5c/cpp/src/parquet/file_reader.cc#L448
   
   where we are adding two `uint32_t`s without regard for potential addition 
overflow.
   
   We should strive to use `int64_t` almost everywhere, only switching to 
narrower types when calling into third-party APIs that use such types.
   
   Kudos to Ada Logics and Claude for submitting a more detailed example of 
invalid pointer read.
   
   ### Component(s)
   
   C++, Parquet


-- 
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]

Reply via email to