Skip to content

fix(ethcoder): handle short hex inputs without panicking - #227

Open
highcloudwind wants to merge 1 commit into
0xsequence:masterfrom
highcloudwind:my_feature
Open

highcloudwind wants to merge 1 commit into
0xsequence:masterfrom
highcloudwind:my_feature

Conversation

@highcloudwind

Copy link
Copy Markdown

An empty or one-character value currently panics in HexTrimLeadingZeros before prefix validation can return its normal error. Check the prefix with strings.HasPrefix before accessing the remainder.

The regression table covers empty, one-character and longer unprefixed values; valid trimming remains covered by the existing test.

Signed-off-by: highcloudwind <pengwenguohuaibi@outlook.com>
@highcloudwind
highcloudwind requested a review from a team November 11, 2026 03:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T03:34:55.376274Z 02a26e1 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant