samuelcolvin commented on code in PR #6367:
URL: https://github.com/apache/arrow-rs/pull/6367#discussion_r1758469991
##########
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:
ye I think @jhorstmann was right, the error almost certainly happened
because the `prefetch` value was invalid, not because `fetch` returned the
wrong size of slice.
I've updated to check `prefetch` size and added a test.
--
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]