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 integer overflow issue in fabio #623

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Fix integer overflow issue in fabio #623

merged 1 commit into from
Apr 26, 2024

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Mar 28, 2024

fabio would perform some arithmetic with the frame number we provided it to compute byte offsets for GE images. On Windows, an int times a np.int32 is an np.int32. If our frame number was np.int32, for large datasets, this would cause an overflow error, since int32 would be used for the byte offset.

Instead, ensure a python integer is passed, which cannot overflow.

fabio would perform some arithmetic with the frame number we provided
it to compute byte offsets for GE images. If our frame number was
np.uint32, for large datasets, this would cause an overflow error,
since uint32 would be used for the byte offset.

Instead, ensure a python integer is passed, which *cannot* overflow.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery psavery merged commit 66c2a57 into master Apr 26, 2024
6 checks passed
@psavery psavery deleted the fabio-fix-overflow branch April 26, 2024 22:21
This pull request was closed.
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.

1 participant