viirya commented on code in PR #8097: URL: https://github.com/apache/arrow-rs/pull/8097#discussion_r2263648290
########## arrow-ipc/src/reader.rs: ########## @@ -1740,6 +1753,40 @@ mod tests { .unwrap() } + #[test] + fn test_negative_meta_len_start_stream() { + let bytes = i32::to_le_bytes(-1); + let mut buf = vec![]; + buf.extend(CONTINUATION_MARKER); + buf.extend(bytes); + + let reader = StreamReader::try_new(Cursor::new(buf), None); + assert!(reader.is_err()); Review Comment: ```suggestion let reader_err = StreamReader::try_new(Cursor::new(buf), None).err(); assert!(reader_err.is_some()); assert_eq!( reader_err.unwrap().to_string(), "Parser error: Invalid metadata length: -1" ); ``` -- 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