mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-13 17:25:54 +00:00
Use strnlen as its better to be safe than reading past the chunk
This commit is contained in:
@@ -520,7 +520,7 @@ string DXBCFile::GetDebugBinaryPath(const void *ByteCode, size_t ByteCodeLength)
|
||||
{
|
||||
PRIVHeader *privHeader = (PRIVHeader *)fourcc;
|
||||
const char* pathData = (char*)&privHeader->data;
|
||||
size_t pathLength = strlen(pathData);
|
||||
size_t pathLength = strnlen(pathData, privHeader->chunkLength);
|
||||
|
||||
if(privHeader->chunkLength == (pathLength + 1))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user