diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-26 21:34:58 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-26 21:34:58 +0100 |
commit | adebdd278b8e21e7ffeb107af0b3e25534edc796 (patch) | |
tree | 826f24088df473dcc5bbe62647f59817c40aa270 /playlist.c | |
parent | 3ed2d21eddf76ebe1bf05d8624ff50598a1c8d28 (diff) | |
parent | 7262368b6897b41188f0cf6844ca875027d425a4 (diff) |
Merge branch 'master' into devel
Conflicts:
plugins/alsa/alsa.c
streamer.c
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -719,6 +719,8 @@ pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(pla if (strncasecmp (fname, "file://", 7)) { const char *p = fname; int detect_on_access = 1; + + // check if it's URI for (; *p; p++) { if (!strncmp (p, "://", 3)) { break; @@ -728,7 +730,18 @@ pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(pla break; } } + if (detect_on_access && *p == ':') { + // check for wrong chars like CR/LF, TAB, etc + // they are not allowed and might lead to corrupt display in GUI + int32_t i = 0; + while (fname[i]) { + uint32_t c = u8_nextchar (fname, &i); + if (c < 0x20) { + return NULL; + } + } + playItem_t *it = pl_item_alloc (); it->decoder_id = NULL; it->fname = strdup (fname); |