mumble: fix Mumble-SA-2014-002 (CVE-2014-0045).

This commit is contained in:
Mikkel Krautz 2014-01-31 19:32:28 +01:00
parent 850649234d
commit d3be3d7b96

View File

@ -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);