[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: S/MIME decryption bug (and fix)
From: Stefan Rompf <srompf () isg ! de>
Date: 2003-08-27 8:34:36
[Download RAW message or body]
Hi,
current CVS HEAD of KMail fails to decrypt S/MIME messages for me. System is
Redhat 7.3 or Suse 8.1, QT3.2.0 (download from Trolltech) and my KSSL S/MIME
plugin, but I assume that it won't work with Aegypten either.
I've tracked down the problem to ObjectTreeParser::okDecryptMIME(), where a
QCString cipherStr is constructed on the data of QByteArray ciphertext.
However, this constructor stops at the first 0 byte. Later the crypto plugin
is called with the data from cipherStr and the length from ciphertext. This
can lead to an access to uninitialized memory, and either the message cannot
be decrypted or kmail reaches a final state.
Fix is simple:
- bDecryptionOk = cryptPlug->decryptAndCheckMessage( cipherStr.data(),
+ bDecryptionOk = cryptPlug->decryptAndCheckMessage( ciphertext.data(),
If it ok for you, I'll commit this change.
There is also a memory leak when decrypting messages, but I haven't tracked it
down yet. Maybe someone else has an idea.
Stefan
--
"doesn't work" is not a magic word to explain everything.
_______________________________________________
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