mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file
Was an integer overflow issue when calculating offsets.
This commit is contained in:
parent
c5558b3ccd
commit
5cb1251222
1 changed files with 2 additions and 4 deletions
|
|
@ -585,8 +585,7 @@ bool ImageManager::file_load_float_image(Image *img, ImageDataType type, device_
|
|||
}
|
||||
|
||||
if(depth <= 1) {
|
||||
int scanlinesize = width*components*sizeof(float);
|
||||
|
||||
size_t scanlinesize = ((size_t)width)*components*sizeof(float);
|
||||
in->read_image(TypeDesc::FLOAT,
|
||||
(uchar*)readpixels + (height-1)*scanlinesize,
|
||||
AutoStride,
|
||||
|
|
@ -694,8 +693,7 @@ bool ImageManager::file_load_half_image(Image *img, ImageDataType type, device_v
|
|||
}
|
||||
|
||||
if(depth <= 1) {
|
||||
int scanlinesize = width*components*sizeof(half);
|
||||
|
||||
size_t scanlinesize = ((size_t)width)*components*sizeof(half);
|
||||
in->read_image(TypeDesc::HALF,
|
||||
(uchar*)readpixels + (height-1)*scanlinesize,
|
||||
AutoStride,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue