Skip to content

Conversation

@lyrise
Copy link
Member

@lyrise lyrise commented Oct 22, 2025

RocketPack now uses CBOR as its internal serialization format.

@lyrise lyrise self-assigned this Oct 22, 2025
@lyrise lyrise force-pushed the wip/lyirse-2025-10-23 branch from f14a56c to 1bfca01 Compare November 5, 2025 23:36
@omnius-labs omnius-labs deleted a comment from chatgpt-codex-connector bot Nov 6, 2025
@lyrise lyrise force-pushed the wip/lyirse-2025-10-23 branch from cb875f0 to c0c406a Compare November 6, 2025 12:58
@lyrise lyrise force-pushed the wip/lyirse-2025-10-23 branch from c0c406a to 63b8823 Compare November 6, 2025 13:01
@lyrise
Copy link
Member Author

lyrise commented Nov 6, 2025

@codex

@lyrise lyrise marked this pull request as ready for review November 6, 2025 13:04
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines 564 to 568
fn peek_raw_byte(&self) -> Result<u8> {
if self.remaining() < 1 {
return Err(RocketPackDecoderError::UnexpectedEof);
}
Ok(self.buf[self.pos + 1])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@chatgpt-codex-connector
Copy link

Summary

Testing

  • cargo test

View task →

@lyrise lyrise merged commit 691747d into main Nov 6, 2025
3 checks passed
@lyrise lyrise deleted the wip/lyirse-2025-10-23 branch November 6, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants