jhorstmann commented on code in PR #6367:
URL: https://github.com/apache/arrow-rs/pull/6367#discussion_r1752272355
##########
parquet/src/arrow/async_reader/metadata.rs:
##########
@@ -71,7 +71,10 @@ impl<F: MetadataFetch> MetadataLoader<F> {
let suffix_len = suffix.len();
let mut footer = [0; 8];
- footer.copy_from_slice(&suffix[suffix_len - 8..suffix_len]);
+ let Some(footer_start) = suffix_len.checked_sub(8) else {
Review Comment:
Maybe it is also possible to hit this error if `size_hint` is smaller than
8? A minimum value for `size_hint` could make sense, or returning an error if
it is too small.
--
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]