D12047: Avoid crash when reading corrupt data from document terms db
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Sun Apr 8 14:48:56 UTC 2018
bruns created this revision.
bruns added reviewers: Baloo, michaelh.
Restricted Application added projects: Frameworks, Baloo.
Restricted Application added a subscriber: Frameworks.
bruns requested review of this revision.
REVISION SUMMARY
The terms db contains terms, where each terms is stored independently
(terminated with 0), or as a suffix to the previous term (terminated with
1).
In case of corrupted data, the first terminator seen may be a 1, which
leads to a crash when trying to access the previous term with
QVector<>::last().
Show a debug message, to give a hint about the bad data, which can be
fixed by reindexing the relevant file.
BUG: 392878
CCBUG: 392877
TEST PLAN
Corrupt the database
Run balooshow -x <affected file(s)>
REPOSITORY
R293 Baloo
BRANCH
b392878_avoid_docterms_decode_crash
REVISION DETAIL
https://phabricator.kde.org/D12047
AFFECTED FILES
src/codecs/doctermscodec.cpp
src/engine/documentdb.cpp
To: bruns, #baloo, michaelh
Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180408/8e9e43e8/attachment.html>
More information about the Kde-frameworks-devel
mailing list