[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/kfile-plugins/torrent
From:       Pascal Létourneau <pletourn () globetrotter ! net>
Date:       2005-01-18 20:37:15
Message-ID: 20050118203715.5B4901BA42 () office ! kde ! org
[Download RAW message or body]

CVS commit by pletourn: 

Don't crash on an empty file


  M +6 -0      kfile_torrent.cpp   1.4


--- kdenetwork/kfile-plugins/torrent/kfile_torrent.cpp  #1.3:1.4
@@ -141,4 +141,10 @@ bool KTorrentPlugin::readInfo (KFileMeta
     file.close();
 
+    if (!buf)
+    {
+        kdError() << "Empty file: " << info.path() << endl;
+        return false;
+    }
+
     m_dict = new BDict(buf);
     


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic