Bug 356206 - baloo will assert when searchString is empty.
Summary: baloo will assert when searchString is empty.
Status: RESOLVED FIXED
Alias: None
Product: Baloo
Classification: Unmaintained
Component: General (show other bugs)
Version: 5.9.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-02 18:24 UTC by Weng Xuetian
Modified: 2015-12-14 23:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Weng Xuetian 2015-12-02 18:24:33 UTC
When search string is empty, query.d->m_term.value() will be invalid, which is actually a valid case.

Reproducible: Always

Steps to Reproduce:
1. build baloo with debug
2. run baloosearch ""
3. assertion happens.
ASSERT: "term.value().isValid()" in file src/lib/searchstore.cpp, line 178

Actual Results:  
assertion happens

Expected Results:  
no assertion happens
Comment 1 Vishesh Handa 2015-12-14 23:04:24 UTC
Confirmed. Good catch.
Comment 2 Vishesh Handa 2015-12-14 23:15:19 UTC
* commit 9b17d81b5152d28eba80b4b67fbda2ca5da41054
| Author: Vishesh Handa <me@vhanda.in>
| Date:   Tue Dec 15 00:09:16 2015 +0100
|
|     SearchStore: Gracefully handle empty term values
|
|     This happens on calling the baloosearch executable with an empty string
|     or a few spaces.
|
|     BUG: 356176
|     FIXED-IN: 5.18