From kde-commits Wed Nov 30 23:53:01 2011 From: Laszlo Papp Date: Wed, 30 Nov 2011 23:53:01 +0000 To: kde-commits Subject: [qtopenal] src: Return QByteArray() if something went wrong during Message-Id: <20111130235301.7433EA60A6 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=132269729603156 Git commit 60986372f3bd02fd8125873497e4094e6a577c30 by Laszlo Papp. Committed on 01/12/2011 at 02:17. Pushed by lpapp into branch 'master'. Return QByteArray() if something went wrong during the decoding M +3 -1 src/qalsndaudiodecoder.cpp http://commits.kde.org/qtopenal/60986372f3bd02fd8125873497e4094e6a577c30 diff --git a/src/qalsndaudiodecoder.cpp b/src/qalsndaudiodecoder.cpp index bb23b66..9eed040 100644 --- a/src/qalsndaudiodecoder.cpp +++ b/src/qalsndaudiodecoder.cpp @@ -211,8 +211,10 @@ QALSndAudioDecoder::decode(qint64 maxlen) = char *decodedData =3D result.data(); = - if (maxlen !=3D decode(decodedData, maxlen)) + if (maxlen !=3D decode(decodedData, maxlen)) { qWarning() << Q_FUNC_INFO << "Could not to decode all the data:" <= < maxlen; + return QByteArray(); + } = return result; }