Browse Source

fix exr memory allocation size overflow by turning the size into a uint64_t (#96)

Nuno Silva 4 months ago
parent
commit
3af74f3fe1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/image_decode.cpp

+ 1 - 1
src/image_decode.cpp

@@ -547,7 +547,7 @@ namespace bimg
 						stepA  = 1;
 					}
 
-					data   = (uint8_t*)bx::alloc(_allocator, exrImage.width * exrImage.height * dstBpp/8);
+					data   = (uint8_t*)bx::alloc(_allocator, (size_t)exrImage.width * exrImage.height * dstBpp/8);
 					width  = exrImage.width;
 					height = exrImage.height;