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

List:       kmail-devel
Subject:    small bug in kmime_header_parsing.cpp ?
From:       Arnaud Burlet <arnaud.burlet () epfl ! ch>
Date:       2003-07-11 7:36:06
[Download RAW message or body]

Hi, this is my first post to the list. For this one and the other, please 
excuse my poor english.

I'm trying to implement myself a feature in Kmail, however this is not the 
purpose of this message.

I'm working with kdepim's cvs HEAD and I tried to use function 
KMMessage::headerAddrField(...). That function calls parseAddressList(...) 
which always returned me false (although all the parsing was done correctly).

Attached, I submit a patch against kdepim that fixes the problem.

The problem is that function like KMMessage::headerAddrField(...) use the 
end() method of a QCString, which returns an iterator() pointing past the \0 
(end of string). so \0 has to be parsed ... that's what my patch does.

I don't know if it's the right place to post that. I haven't filled a bug 
report because I'm not sure I understood all that well. Let me know what to 
do with that please.


Arnaud

["diff" (text/x-diff)]

Index: libkdenetwork/kmime_header_parsing.cpp
===================================================================
RCS file: /home/kde/kdepim/libkdenetwork/kmime_header_parsing.cpp,v
retrieving revision 1.19
diff -u -r1.19 kmime_header_parsing.cpp
--- libkdenetwork/kmime_header_parsing.cpp	26 Jun 2003 15:00:53 -0000	1.19
+++ libkdenetwork/kmime_header_parsing.cpp	10 Jul 2003 15:10:34 -0000
@@ -695,6 +695,7 @@
     char ch = *scursor++;
 
     switch( ch ) {
+    case '\0': // end of string
     case ' ':
     case '\t': // whitespace
     case '\r':


_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail


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

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