Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appstream crashes with a short search #61

Closed
aleixpol opened this issue Aug 3, 2016 · 2 comments
Closed

Appstream crashes with a short search #61

aleixpol opened this issue Aug 3, 2016 · 2 comments
Labels

Comments

@aleixpol
Copy link
Collaborator

aleixpol commented Aug 3, 2016

$ appstreamcli search ka
**
ERROR:/home/apol/devel/frameworks/appstream/src/as-data-pool.c:1024:as_data_pool_search: assertion failed: (terms)
Aborted (core dumped)

as_utils_search_token_valid returns null if the string is too short. I'd say it's ok to restrict broad searches, but I'd rather limit it from the frontend.

@ximion
Copy link
Owner

ximion commented Aug 3, 2016

Actually, we should IMHO just return everything for short searches, like we did previously (it's a nice way of telling the user "your search is too broad").
Oh yeah, and we should never crash.

@ximion ximion added the bug label Aug 3, 2016
@ximion
Copy link
Owner

ximion commented Aug 3, 2016

And fixed, thanks for reporting! (this helps to improve the unit tests for searching ^^) :)

@ximion ximion closed this as completed in 5fa8be5 Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants