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

ByteArray.u64 may overflow #1070

Open
airicyu opened this issue Sep 22, 2023 · 0 comments
Open

ByteArray.u64 may overflow #1070

airicyu opened this issue Sep 22, 2023 · 0 comments
Labels
bug Something isn't working library

Comments

@airicyu
Copy link

airicyu commented Sep 22, 2023

current implementation of this method is:

factory ByteArray.u64(int value) =>
_encodeBigIntAsUnsigned(BigInt.from(value), 8);

if value is larger than 2^63, it may have overflow problem.
may better provide a method to pass BigInt directly as parameter.

@airicyu airicyu added bug Something isn't working library labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working library
Projects
None yet
Development

No branches or pull requests

1 participant