Skip to main content

process_block_items

Function process_block_items 

Source
fn process_block_items(
    buf: &mut AvroCursor<'_>,
    count: usize,
    total: usize,
    on_item: &mut impl FnMut(&mut AvroCursor<'_>) -> Result<(), AvroError>,
) -> Result<usize, AvroError>
Expand description

Decode count items, capping the running total at i32::MAX (the largest index an Arrow list/map offset holds). Otherwise a crafted i64::MAX count of a zero-byte item like null spins the loop forever (#10235); byte-consuming items self-terminate on cursor exhaustion, so valid blocks (including array<null>) are unaffected.