-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Lyrise 2025-10-23 #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f14a56c to
1bfca01
Compare
cb875f0 to
c0c406a
Compare
c0c406a to
63b8823
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fn peek_raw_byte(&self) -> Result<u8> { | ||
| if self.remaining() < 1 { | ||
| return Err(RocketPackDecoderError::UnexpectedEof); | ||
| } | ||
| Ok(self.buf[self.pos + 1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard peek_raw_byte against single-byte buffers
When RocketPackBytesDecoder::peek_raw_byte checks for EOF it only rejects remaining() < 1, but then indexes self.buf[self.pos + 1]. If the decoder is positioned at the last byte (remaining() == 1), this function will index out of bounds and panic instead of returning UnexpectedEof. The method is used by type_of to inspect negative integers, so a truncated message that ends exactly after the header byte triggers a panic during type inspection rather than a recoverable decode error, allowing malformed input to crash consumers.
Useful? React with 👍 / 👎.
|
Summary
Testing
|
RocketPack now uses CBOR as its internal serialization format.