samuelcolvin opened a new pull request, #6367:
URL: https://github.com/apache/arrow-rs/pull/6367

   # Which issue does this PR close?
   
   None
   
   # Rationale for this change
    
   While messing with our `object_store` implementation I sent invalid data to 
`MetadataEncoder` and got a panic:
   
   ```
   thread 'tokio-runtime-worker' panicked at 
/Users/samuel/.cargo/git/checkouts/arrow-rs-3b86e19e889d5acc/ee2f75a/parquet/src/arrow/async_reader/metadata.rs:74:40:
   attempt to subtract with overflow
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   libunwind: stepWithCompactEncoding - invalid compact unwind encoding
   ```
   
   Looking at the code I'm pretty sure it's because `suffix_len` is <8 causing 
the subtract to fail.
   
   # What changes are included in this PR?
   
   return an error instead of panicing. I don't know how to reproduce this in a 
test, hence just the change. LMK if this requires a test?
   
   # Are there any user-facing changes?
   
   no.
   


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