viirya commented on code in PR #8097: URL: https://github.com/apache/arrow-rs/pull/8097#discussion_r2263642282
########## arrow-ipc/src/reader.rs: ########## @@ -1484,13 +1489,19 @@ impl<R: Read> StreamReader<R> { i32::from_le_bytes(meta_size) }; + let Ok(meta_len) = usize::try_from(meta_len) else { + return Err(ArrowError::ParseError(format!( + "Invalid metadata length: {meta_len}" + ))); + }; Review Comment: ```suggestion let meta_len = usize::try_from(meta_len) .map_err(|_| ArrowError::ParseError(format!("Invalid metadata length: {meta_len}")))?; ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org