mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Don't resize to negative size if reading length fails for any reason
This commit is contained in:
@@ -82,8 +82,11 @@ void Command::Recv(StreamReader &reader)
|
||||
}
|
||||
|
||||
data.clear();
|
||||
data.resize(length - 11);
|
||||
reader.Read(&data[0], data.size());
|
||||
if(length >= 11)
|
||||
{
|
||||
data.resize(length - 11);
|
||||
reader.Read(&data[0], data.size());
|
||||
}
|
||||
}
|
||||
|
||||
CommandData Command::GetData()
|
||||
|
||||
Reference in New Issue
Block a user