[Kde-pim] branches/work/kdepim-3.5.5+/kmail

Adriaan de Groot groot at kde.org
Wed Feb 14 05:18:52 GMT 2007


On Wednesday 14 February 2007, Adriaan de Groot wrote:
> Stop KMail from crashing all the time in PIM+; check if the data range in
> the index for this message would make sense at all. If not, no string part.
> Needs r. 633411 API changes.

Basically, get*Part() wasn't checking if the g_chunk part makes any sense. 
That means that the offset would have to lie within the index file. If it's 
not in there, the resulting pointer isn't in the mmap(2)ed area and will 
cause a crash. Apparently no code before the tagging patch was calling 
get*Part before the index had been updated for each message.

This *particular* patch only guards in the mmap()ed StringPart case. There 
should probably be checks on the fseek and fread calls and a check on the 
offset there, too, and the same guards applied to the other get*Part methods 
just in case those get called out of turn as well.

But *my* KMail can now read two messages without crashing, and that's a big 
improvement.

-- 
These are your friends - Adem
    GPG: FEA2 A3FE Adriaan de Groot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070214/d69e0f73/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/


More information about the kde-pim mailing list