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

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/kmail
From:       Allen Winter <winter () kde ! org>
Date:       2007-02-13 3:45:20
Message-ID: 1171338320.551043.2034.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 633071 by winterz:

merge SVN commit 632062 by adridg:

After updating KMail and throwing away index files, I encountered a file which has \
charset= set, and that triggered a QGList warning when subscripting an empty string; \
adding this extra check for empty charsets stops crashing after that warning.


 M  +1 -2      kmfoldermaildir.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmfoldermaildir.cpp #633070:633071
@@ -28,7 +28,6 @@
 #include <kstaticdeleter.h>
 #include <kmessagebox.h>
 
-#include <ctype.h>
 #include <dirent.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -734,7 +733,7 @@
         int cidx = contentTypeStr.find( "charset=" );
         if ( cidx != -1 ) {
           charset = contentTypeStr.mid( cidx + 8 );
-          if ( charset[0] == '"' ) {
+          if ( !charset.isEmpty() && ( charset[0] == '"' ) ) {
             charset = charset.mid( 1 );
           }
           cidx = 0;


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

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