Your message dated Wed, 29 Nov 2000 10:16:36 +0100 with message-id <00112910163600.02230@michael> and subject line Bug#16072: patch for trailing garbage in kmreaderwin has caused the attached bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I'm talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Stephan Kulow (administrator, KDE bugs database) Received: (at submit) by bugs.kde.org; 26 Nov 2000 14:05:48 +0000 Received: (qmail 21142 invoked from network); 26 Nov 2000 14:05:48 -0000 Received: from mailout06.sul.t-online.com (194.25.134.19) by max.tat.physik.uni-tuebingen.de with SMTP; 26 Nov 2000 14:05:48 -0000 Received: from fwd03.sul.t-online.com by mailout06.sul.t-online.com with smtp id 1402Qw-000621-09; Sun, 26 Nov 2000 15:05:34 +0100 Received: from poboxes.com (320056291824-0001@[62.158.235.117]) by fmrl03.sul.t-online.com with esmtp id 1402Qu-22oIMKC; Sun, 26 Nov 2000 15:05:32 +0100 Received: from verilin (verilin.verisoft.ch [192.168.1.99]) by poboxes.com (Postfix) with SMTP id 1437C3F851 for ; Sun, 26 Nov 2000 15:05:13 +0100 (CET) Subject: patch for trailing garbage in kmreaderwin From: Wolfgang Rohdewald To: submit@bugs.kde.org Message-Id: <20001126140514.1437C3F851@poboxes.com> Date: Sun, 26 Nov 2000 15:05:14 +0100 (CET) X-Sender: (null).320056291824-0001@t-dialin.net Package: kmail Version: 1.2 (KDE 2.0 >= 20001117) Severity: normal Compiler: gcc version 2.95.2 19991024 (release) OS: Linux 2.2.16 i686 (compiled sources) when displaying messages, I often have garbage characters at the end of the message. They change randomly when reloading the message. True for text and html view. This patch fixes it. However I don't like it at all. I think QCString KMMessage::bodyDecoded(void) const and its usage should be fixed. Either it can return NUL, so it should return QByteArray, or it cannot, so kmreaderwin.cpp should copy it into QCString and not QBytearray. If both is possible, and the caller knows which one is correct, maybe bodyDecoded should be overloaded: one version returning QByteArray and one returning QCString. But I'd rather not do such a patch unless encouraged. I am not even sure if overloading is possible here, or if two separate function names are needed. I'd first have to dig out my C++ books. /u2/src/cvs/kde/kdenetwork/kmail$ diff -u kmreaderwin.cpp /tmp/x2 --- kmreaderwin.cpp Fri Nov 17 21:49:51 2000 +++ /tmp/x2 Sun Nov 26 14:37:59 2000 @@ -589,6 +589,8 @@ if (htmlMail() && stricmp(subtype, "html")==0) // is it html? { // yes... str = msgPart.bodyDecoded(); // decode it... + str.resize( str.count() + 1 ); + str.at( str.count() - 1 ) = '\0'; mViewer->write(str.data()); // write it... return; // return, finshed. } @@ -596,6 +598,8 @@ // wasn't html show only if { // support for html is turned off str = msgPart.bodyDecoded(); // decode it... + str.resize( str.count() + 1 ); + str.at( str.count() - 1 ) = '\0'; writeBodyStr(str.data()); return; } _______________________________________________ Kmail Developers mailing list Kmail@master.kde.org http://master.kde.org/mailman/listinfo/kmail