Patch: Possible fix for crash of kfile_flac.cpp

Helio Chissini de Castro helio at kde.org
Wed Mar 2 10:57:46 GMT 2005


Ok for me, please forward to core-devel..

On Tuesday 01 March 2005 20:09, Christian Esken wrote:
> Hi,
>
> I am continuosly experiencing crashes with 0 byte long FLAC files. My first
> guess was Amarok, because Amarok was crashing. The Amarok guys were telling
> me that it is impossible, except when I have an outdated Taglib. Well, my
> Taglib is from kdesupport, so that shouldn't be the case. So I investigated
> a bit more found  out that Konqy crashes as well (in "icon" mode, when
> placing the mouse pointer over such a file). The problem seems to stem from
> kfile_flac.cpp. I read some Taglib Code and now I suspect, that
> kfile_flac.cpp is buggy and that the following fix would be appropriate.
>
> Result: It doesn't crash anymore. :-)
> But probably somebody with more Taglib knowledge should take a look into
> it. If the patch is good, should it be submitted to kde-core-devel for
> inclusion into KDE3.4?
>
> Chris
>
>
> chris at bjork:~/CVS/kdemultimedia/kfile-plugins/flac> cvs diff kfile_flac.cpp
> Index: kfile_flac.cpp
> ===================================================================
> RCS file: /home/kde/kdemultimedia/kfile-plugins/flac/kfile_flac.cpp,v
> retrieving revision 1.11
> diff -u -r1.11 kfile_flac.cpp
> --- kfile_flac.cpp      8 Sep 2004 22:03:40 -0000       1.11
> +++ kfile_flac.cpp      1 Mar 2005 22:58:26 -0000
> @@ -167,7 +167,7 @@
>          file = new
> TagLib::Ogg::FLAC::File(QFile::encodeName(info.path()).data(), readTech);
> #endif
>
> -    if (!file || !file->isOpen())
> +    if ( !file || ! file->isValid())
>      {
>          kdDebug(7034) << "Couldn't open " << file->name() << endl;
>          delete file;

-- 
Helio Chissini de Castro
KDE Developer
Brasil/South America Primary Contact



More information about the kde-multimedia mailing list