From a3dc70bd57c1dfbc3a97901cd5c7c323fe28c3ef Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 26 May 2014 11:33:07 +0200 Subject: don't call utfcasestr_fast on non-utf8 data, to fix plt_search_process crash when searching e.g. in tracks which have non-utf8 filenames --- playlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playlist.c') diff --git a/playlist.c b/playlist.c index 964e3d1e..70c129b2 100644 --- a/playlist.c +++ b/playlist.c @@ -3735,7 +3735,7 @@ plt_search_process (playlist_t *playlist, const char *text) { break; } } - else if (utfcasestr_fast (value, lc)) { + else if (u8_valid(value, strlen(value), NULL) && u8_valid(lc, strlen(lc), NULL) && utfcasestr_fast (value, lc)) { //fprintf (stderr, "%s -> %s match (%s.%s)\n", text, value, pl_find_meta_raw (it, ":URI"), m->key); // add to list it->next[PL_SEARCH] = NULL; -- cgit v1.2.3