avoid crash when reading from connection times out
ClosedPublic

Authored by mkoller on May 1 2017, 3:14 PM.

Details

Summary

DataStream::waitForData() can time out. When this happens, Protocol::deserialize() throws an exception and the returned pointer
is nullptr, wich is not checked for in the connection.
I had exactly this crash, therefore I found it.

Diff Detail

Repository
R165 Akonadi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mkoller created this revision.May 1 2017, 3:14 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMay 1 2017, 3:14 PM
Restricted Application added a subscriber: KDE PIM. · View Herald Transcript
dvratil accepted this revision.May 3 2017, 9:11 AM
This revision is now accepted and ready to land.May 3 2017, 9:11 AM
This revision was automatically updated to reflect the committed changes.