etseidl commented on code in PR #12142:
URL: https://github.com/apache/arrow-rs/pull/12142#discussion_r4568248834
##########
parquet/src/file/page_index/offset_index.rs:
##########
@@ -78,7 +78,9 @@ impl OffsetIndexMetaData {
// we have to do this manually because we want to use the fast
PageLocation decoder
let list_ident = prot.read_list_begin()?;
validate_list_type(ElementType::Struct, &list_ident)?;
- let mut page_locations = Vec::with_capacity(list_ident.size as usize);
+ let size = list_ident.size as usize;
+ check_list_size(prot.remaining_bytes(), size)?;
+ let mut page_locations = Vec::with_capacity(size);
Review Comment:
No existing issue for this change. I just thought I'd fix it along with the
others.
--
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]