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

strtoul in bif.l corrupts numbers larger than 2^32 on Windows #14

Open
PaulTNA opened this issue Aug 31, 2021 · 0 comments
Open

strtoul in bif.l corrupts numbers larger than 2^32 on Windows #14

PaulTNA opened this issue Aug 31, 2021 · 0 comments

Comments

@PaulTNA
Copy link

PaulTNA commented Aug 31, 2021

On line 277 of bif.l, strtoul is used to convert the value from a string to uint64_t.
However on Windows, unsigned long is 32 bits not 64, so strtoul will silently corrupt any value greater than 0xFFFFFFFF to that value.

The correct function should be strtoull

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