mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-23 04:21:09 +00:00
Don't resize to negative size if reading length fails for any reason
This commit is contained in:
1 file changed
+5
-2
@@ -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