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

List:       kmail-devel
Subject:    Bug#16072: patch for trailing garbage in kmreaderwin
From:       Wolfgang Rohdewald <WRohdewald () dplanet ! ch>
Date:       2000-11-29 4:03:35
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 28 November 2000 16:54, Michael Häckel wrote:
> On Tuesday, 28. November 2000 01:48, you wrote:
> > This patch activated another latent bug in
> > kmcomposewin::applyChanges: If I forward and GPG sign a message with
> > attachment, this bug removed the last LF of the string END PGP SIGNATURE
> > Result: Kpgp::setMessage did not find this string.
> >     // begin the search for the next '\n' after "-----END PGP"
> >     index = mess.find("\n",index+13);
> >     back  = mess.right(mess.length() - index); // index is -1 since LF
> > missing
> >
> > Result: The text appears twice. Example in Mail "Fwd: Fax..." in attached
> > file. The buggy code removed the last char (the LF) by shortening the
> > string by 1 char. But the LF was still there - until my patch explicitly
> > puts a HEX 00 there. I fixed that too.
>
> But you removed my bugfix for the problem, that a mail with attachment and
> encoding for the text part quoted printable (switchable in the configure
> dialog) has a =00 at the end of the body part.
>
> The bug must be somewhere else in your patch. At least this double text
> problem does not appear without it.

I reworked the patch. You can find it at

http://www.dplanet.ch/users/WRohdewald/kde/decode.diff

there are now different sets of methods for encoding/decoding bodies, one for
binary bodies (no hex 00 appended), and one for text bodies. Your patch in
kmcomposewin::applyChanges() is now in KMMessagePart::setBodyEncoded which
takes a QCString and removes the trailing 00. Opposed to setBodyEncodedBinary.

With this patch, less copying between QCString and QByteArray needs to be
done by callers of these methods, the code seems clearer to me.

I don't like KMMessagePart::SetBody() - it should be told whether the argument
is text or binary, now it always appends hex 00 even if binary.

- - - -- 

mit freundlichen Gruessen
with my best greetings
Wolfgang Rohdewald
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjokgBcACgkQMoa7xU5silot8wCfcwar0vw8MMbaQjsE71zwu3qe
F4oAoJjMWelipJodZHi1R4rCM9UoPLLs
=BeFb
-----END PGP SIGNATURE-----
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.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