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

Cast to uintmax_t *before* multiplying in space calculations #133

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

musicinmybrain
Copy link
Contributor

This ensures that all cases where the result actually does fit in a
uintmax_t are correctly handled. Before, the multiplication could be
performed in a smaller type, leading to an incorrect result or, worse,
undefined behavior due to signed integer overflow.

This fixes a test failure that was actually observed on an i686 Linux
system.

This ensures that all cases where the result actually does fit in a
uintmax_t are correctly handled. Before, the multiplication could be
performed in a smaller type, leading to an incorrect result or, worse,
undefined behavior due to signed integer overflow.

This fixes a test failure that was actually observed on an i686 Linux
system.
@gulrak
Copy link
Owner

gulrak commented Jul 30, 2021

You are right, thank you for the fix.

@gulrak gulrak added bug Something isn't working POSIX POSIX type backend is affected labels Jul 30, 2021
@gulrak gulrak self-requested a review July 30, 2021 22:07
@gulrak gulrak merged commit 7bc5c17 into gulrak:master Jul 30, 2021
@gulrak gulrak added the available on master Fix is done on master branch, issue closed on next release label Jul 30, 2021
@gulrak gulrak added this to the v1.5.10 milestone Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available on master Fix is done on master branch, issue closed on next release bug Something isn't working POSIX POSIX type backend is affected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants