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

Uint64 values out of range #1

Open
jonyoder opened this issue Sep 9, 2022 · 0 comments
Open

Uint64 values out of range #1

jonyoder opened this issue Sep 9, 2022 · 0 comments

Comments

@jonyoder
Copy link

jonyoder commented Sep 9, 2022

I was testing the version parsing against all current PyPI.org versions, and I ran into some out-of-range version components that are allowed by PyPI.org:

error parsing version: strconv.ParseUint: parsing "20210609131134657401": value out of range
error parsing version: strconv.ParseUint: parsing "9786796767868973145897342348293748973489579438579384579384": value out of range
error parsing version: strconv.ParseUint: parsing "14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593": value out of range

I have a working fix that modifies part.Uint64 to use math/big instead of uint64, and it fixes the issue. These changes are on a fork in our codebase.

Would you be interested in these improvements? If so, I can create a pull request here and also in the related aquasecurity/go-version module. Obviously, I would also change the modifications in go-version to add a new part type instead of modifying part.Uint64.

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

No branches or pull requests

1 participant