Skip to content
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

Fix DecodeLength() for long values in variable length HEX field #348

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

svz-ya
Copy link
Contributor

@svz-ya svz-ya commented Feb 10, 2025

Make parsing the length unsigned.
For example when a variable length HEX field (with length prefix of 1 byte) has more then 0x7F data bytes it gives error:

DecodeLength() error = strconv.ParseInt: parsing "FF": value out of range

See new test case.

@svz-ya svz-ya requested a review from alovak as a code owner February 10, 2025 17:48
@alovak alovak merged commit 3741614 into moov-io:master Feb 10, 2025
8 checks passed
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