From kmail-devel Fri Jul 11 07:36:06 2003 From: Arnaud Burlet Date: Fri, 11 Jul 2003 07:36:06 +0000 To: kmail-devel Subject: small bug in kmime_header_parsing.cpp ? X-MARC-Message: https://marc.info/?l=kmail-devel&m=105790905601239 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_mjmD/IKDcI2A4r5" --Boundary-00=_mjmD/IKDcI2A4r5 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --Boundary-00=_mjmD/IKDcI2A4r5 Content-Type: text/x-diff; charset="iso-8859-15"; name="diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="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': --Boundary-00=_mjmD/IKDcI2A4r5 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KMail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail --Boundary-00=_mjmD/IKDcI2A4r5--