From 2099a8c3c77eea56b95a60e12f265b4eb1d8913d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 9 Mar 2015 12:31:11 +0100 Subject: Fix uninitialized memory reads in MFAudioDecoderControl. Initialize all members in constructor. [W] UMR: Uninitialized memory read in MFAudioDecoderControl::handleMediaSourceReady(void) {1 occurrence} Error location MFAudioDecoderControl::handleMediaSourceReady(void) [c:\qt\qt-55-32\qt-55-32\qtmultimedia\src\plugins\wmf\decoder\mfaudiodecodercontrol.cpp:254] [W] UMR: Uninitialized memory read in MFAudioDecoderControl::activatePipeline(void) {1 occurrence} MFAudioDecoderControl::activatePipeline(void) [c:\qt\qt-55-32\qt-55-32\qtmultimedia\src\plugins\wmf\decoder\mfaudiodecodercontrol.cpp:289] Task-number: QTBUG-40571 Change-Id: I6f97cf72284f739ceffcf65162963d00de979ea2 Reviewed-by: Yoann Lopes --- src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp index a29bebbfd..d0aed239a 100644 --- a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp +++ b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp @@ -41,7 +41,11 @@ MFAudioDecoderControl::MFAudioDecoderControl(QObject *parent) , m_resampler(0) , m_state(QAudioDecoder::StoppedState) , m_device(0) + , m_mfInputStreamID(0) + , m_mfOutputStreamID(0) , m_bufferReady(false) + , m_duration(0) + , m_position(0) , m_loadingSource(false) , m_mfOutputType(0) , m_convertSample(0) @@ -53,8 +57,6 @@ MFAudioDecoderControl::MFAudioDecoderControl(QObject *parent) qCritical("MFAudioDecoderControl: Failed to create resampler(CLSID_CResamplerMediaObject)!"); return; } - m_mfInputStreamID = 0; - m_mfOutputStreamID = 0; m_resampler->AddInputStreams(1, &m_mfInputStreamID); connect(m_sourceResolver, SIGNAL(mediaSourceReady()), this, SLOT(handleMediaSourceReady())); -- cgit v1.2.3