akashchamp opened a new pull request, #3955:
URL: https://github.com/apache/iceberg-python/pull/3955

   Closes #3952.
   
   # Rationale for this change
   
   The Cython Avro decoder advanced raw pointers using encoded lengths and 
continuation bytes without checking the end of its owned buffer. This change 
bounds every varint decode and payload/read/skip advance, preserves the cursor 
when a varint cannot be fully decoded, and reports malformed input as 
`EOFError`. It also keeps Avro negative-length handling aligned with the pure 
Python decoder.
   
   # Are these changes tested?
   
   - `make lint`
   - Focused compiled-decoder suite: `tests/avro/test_decoder.py` — 68 passed.
   - Supported unit suite: 4,111 passed and 5 skipped; three Hive GSSAPI tests 
were excluded because the remote host lacks `krb5-config` and the optional 
native `kerberos` extension.
   - Manual compiled-decoder validation confirmed that an unterminated varint, 
an in-buffer overlong varint, and a truncated payload each raise `EOFError` 
without advancing the cursor past valid input. A valid integer and bytes 
payload still decode successfully.
   
   # Are there any user-facing changes?
   
   Yes. Malformed input handled by the Cython Avro decoder now fails with 
`EOFError` instead of reading past the buffer. Valid input behavior is 
unchanged.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to