mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 12:35:31 +02:00
guard against incorrectly sized AudioStreamStats from packet
This commit is contained in:
parent
2ac1445683
commit
b7c6fa003d
1 changed files with 8 additions and 0 deletions
|
@ -325,6 +325,14 @@ int AudioMixerClientData::parseData(ReceivedMessage& message) {
|
|||
// skip over header, appendFlag, and num stats packed
|
||||
message.seek(sizeof(quint8) + sizeof(quint16));
|
||||
|
||||
if (message.getBytesLeftToRead() != sizeof(AudioStreamStats)) {
|
||||
qWarning() << "Received AudioStreamStats of wrong size" << message.getBytesLeftToRead()
|
||||
<< "instead of" << sizeof(AudioStreamStats) << "from"
|
||||
<< message.getSourceID() << "at" << message.getSenderSockAddr();
|
||||
|
||||
return message.getPosition();
|
||||
}
|
||||
|
||||
// read the downstream audio stream stats
|
||||
message.readPrimitive(&_downstreamAudioStreamStats);
|
||||
|
||||
|
|
Loading…
Reference in a new issue