mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Disallow EXR files that are too large
This commit is contained in:
@@ -726,7 +726,15 @@ void ImageViewer::RefreshFile()
|
||||
texDetails.width = exrImage.width;
|
||||
texDetails.height = exrImage.height;
|
||||
|
||||
datasize = texDetails.width * texDetails.height * 4 * sizeof(float);
|
||||
if(texDetails.width > 16384 || texDetails.width > 16384)
|
||||
{
|
||||
SET_ERROR_RESULT(m_Error, ResultCode::OutOfMemory,
|
||||
"EXR dimension %d x %d is too large for display", exrImage.width,
|
||||
exrImage.height);
|
||||
return;
|
||||
}
|
||||
|
||||
datasize = size_t(texDetails.width) * size_t(texDetails.height) * 4 * sizeof(float);
|
||||
data = (byte *)malloc(datasize);
|
||||
|
||||
if(!data)
|
||||
|
||||
Reference in New Issue
Block a user