Zakir032002 commented on PR #3374:
URL: https://github.com/apache/fory/pull/3374#issuecomment-3943803774

   also noticed — `ReadVarUint32Small7` only does `fill(1)` for the first byte, 
but if that byte has `0x80` set it falls through to `continueReadVarUint32` 
which isn't touched in this PR. so in stream mode, if a multi-byte varint 
straddles a chunk boundary, the continuation bytes may not be in the buffer yet 
— you either get a `BufferOutOfBoundError` or silently read the wrong bytes 
depending on what's sitting at that position in the buffer.
   
   easiest fix is probably just routing the multi-byte case through 
`readVarUint32Slow` since that's already stream-aware after your changes. or 
adding `fill(1)` guards inside `continueReadVarUint32` directly, either works.
   
   Happy to discuss if I'm misreading the flow here


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