diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2014-01-31 22:32:28 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2014-01-31 22:32:28 +0400 |
commit | 269e93ea006040678d89d39631c8fb3a0a523b3e (patch) | |
tree | c97d5f0a781f2d282e3288e444742b215886d633 | |
parent | 7e31c3203272bf18b687aac9d755ff124ccecffe (diff) |
mumble: fix Mumble-SA-2014-002 (CVE-2014-0045).
-rw-r--r-- | src/mumble/AudioOutputSpeech.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mumble/AudioOutputSpeech.cpp b/src/mumble/AudioOutputSpeech.cpp index a15010341..c3d91cef0 100644 --- a/src/mumble/AudioOutputSpeech.cpp +++ b/src/mumble/AudioOutputSpeech.cpp @@ -342,6 +342,10 @@ bool AudioOutputSpeech::needSamples(unsigned int snum) { pOut, iAudioBufferSize, 0); + if (decodedSamples < 0) { + decodedSamples = iFrameSize; + memset(pOut, 0, iFrameSize * sizeof(float)); + } #endif } else { if (qba.isEmpty()) { @@ -391,6 +395,10 @@ bool AudioOutputSpeech::needSamples(unsigned int snum) { } else if (umtType == MessageHandler::UDPVoiceOpus) { #ifdef USE_OPUS decodedSamples = opus_decode_float(opusState, NULL, 0, pOut, iFrameSize, 0); + if (decodedSamples < 0) { + decodedSamples = iFrameSize; + memset(pOut, 0, iFrameSize * sizeof(float)); + } #endif } else { speex_decode(dsSpeex, NULL, pOut); |