SVN commit 494651 by adridg:

If proc.collectedStdout() is empty, fromLocal8Bit calls strlen on a NULL 
pointer in Qt 3.3 which may crash. Instead, to the checking here and only 
convert a non-empty buffer. Patch thanks to Markus Brueffer and Frerich Raabe.

CCMAIL: [EMAIL PROTECTED]


 M  +5 -1      encoderlame.cpp  


--- 
branches/KDE/3.5/kdemultimedia/kioslave/audiocd/plugins/lame/encoderlame.cpp 
#494650:494651
@@ -90,7 +90,11 @@
        if(proc.exitStatus() != 0)
                return false;
 
-       QString str = QString::fromLocal8Bit( proc.collectedStdout() );
+       const QByteArray data = proc.collectedStdout();
+       QString str;
+       if ( !data.isEmpty() )
+               str = QString::fromLocal8Bit( data, data.size() );
+
        d->genreList = QStringList::split( '\n', str );
        // Remove the numbers in front of every genre
        for( QStringList::Iterator it = d->genreList.begin(); it != 
d->genreList.end(); ++it ) {
_______________________________________________
kde-freebsd mailing list
[email protected]
http://freebsd.kde.org/mailman/listinfo/kde-freebsd

Reply via email to