diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-05-26 11:33:07 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-05-26 11:35:40 +0200 |
commit | a3dc70bd57c1dfbc3a97901cd5c7c323fe28c3ef (patch) | |
tree | c3f13809cee99b5caad96d55181f49ae8692ae66 | |
parent | d930153d1bcd6f260d2b6e4da662bc4bd9c49682 (diff) |
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
-rw-r--r-- | playlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |