mirror of
https://github.com/lubosz/overte.git
synced 2025-08-06 18:59:16 +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
|
// skip over header, appendFlag, and num stats packed
|
||||||
message.seek(sizeof(quint8) + sizeof(quint16));
|
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
|
// read the downstream audio stream stats
|
||||||
message.readPrimitive(&_downstreamAudioStreamStats);
|
message.readPrimitive(&_downstreamAudioStreamStats);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue