RemoteEventStream: Guard against unreasonably large input.

This commit is contained in:
Michael Lotz
2017-11-21 22:18:17 +01:00
parent 60882f20e1
commit 703667a98d
@@ -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;