Skip to content
Commit e1d1b7e8 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Avoid crash when reading corrupt data from document terms db

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)>

Reviewers: #baloo, michaelh, ngraham, #frameworks, dhaumann

Reviewed By: dhaumann

Subscribers: dhaumann, kde-frameworks-devel, #frameworks

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D12047
parent 0030e88e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment