yonipeleg33 commented on code in PR #10522:
URL: https://github.com/apache/arrow-rs/pull/10522#discussion_r3701698571


##########
arrow-ipc/src/reader.rs:
##########
@@ -3866,4 +3910,56 @@ mod tests {
             assert_eq!(read_batch.column(0).as_ref(), &values);
         }
     }
+
+    /// A message body length is read from the stream before any of the bytes 
it describes,
+    /// so it cannot be trusted. Declaring an implausible one used to reserve 
it outright,
+    /// and the resulting allocation failure aborts the process instead of 
surfacing an error
+    /// the caller can handle.
+    #[test]
+    fn test_stream_reader_rejects_implausible_body_length() {

Review Comment:
   Please add a test that exercises a body with length shorter than the 
`message.bodyLength`, to test the early exit on EOF path



-- 
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]

Reply via email to