You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say vdim is 1 and wdim is 2. Size should then be 6,750,000,000, but anything over 4,294,967,295 overflows. When the wrong value for size is used, the image is not read in correctly, which later results in an access violation exception.
If size_t (unsigned long long) is used for size instead of unsigned long, the value of size is stored correctly.
I propose changing this (in three places) in ImageIO_impl. If this is an acceptable solution, I'm happy to lodge a pull request.
The text was updated successfully, but these errors were encountered:
Imagine you have an inr file with dimensions 1500 x 1500 x 1500, which you are trying to read in, for mesh generation.
In
ImageIO_impl.h
, from line 1245, we have:Let's say
vdim
is 1 andwdim
is 2. Size should then be 6,750,000,000, but anything over 4,294,967,295 overflows. When the wrong value for size is used, the image is not read in correctly, which later results in an access violation exception.If size_t (unsigned long long) is used for size instead of unsigned long, the value of size is stored correctly.
I propose changing this (in three places) in
ImageIO_impl
. If this is an acceptable solution, I'm happy to lodge a pull request.The text was updated successfully, but these errors were encountered: