RemoteEventStream: Guard against unreasonably large input.
This commit is contained in:
@@ -169,6 +169,9 @@ RemoteEventStream::EventReceived(RemoteMessage& message)
|
||||
if (message.Read(numBytes) != B_OK)
|
||||
break;
|
||||
|
||||
if (numBytes > 1000)
|
||||
break;
|
||||
|
||||
char* bytes = (char*)malloc(numBytes + 1);
|
||||
if (bytes == NULL)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user