mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 20:10:05 +00:00
Fix for HDR codec to avoid buffer overread for some malformed files (#471)
This commit is contained in:
parent
976ec533be
commit
dd6904b708
@ -163,7 +163,8 @@ namespace
|
||||
formatFound = true;
|
||||
|
||||
const size_t len = FindEOL(info, size);
|
||||
if (len == size_t(-1))
|
||||
if (len == size_t(-1)
|
||||
|| len < 1)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -207,7 +208,8 @@ namespace
|
||||
else
|
||||
{
|
||||
const size_t len = FindEOL(info, size);
|
||||
if (len == size_t(-1))
|
||||
if (len == size_t(-1)
|
||||
|| len < 1)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user