aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-08 22:14:12 +0100
committerMax Kellermann <max@duempel.org>2014-01-08 22:14:12 +0100
commit139122c57f00b9abf2058fb8c481abb958926b5c (patch)
treee28c2c70eff66781c064d0305b005562f0346fd9 /src/util
parent959d7ca9d00ec480f88ef6ea45b3dab7f0e2b717 (diff)
parentfdd76b346171126e143835429a26044a1cbbfb8f (diff)
downloadmpd-139122c57f00b9abf2058fb8c481abb958926b5c.tar.gz
mpd-139122c57f00b9abf2058fb8c481abb958926b5c.tar.xz
mpd-139122c57f00b9abf2058fb8c481abb958926b5c.zip
Merge branch 'v0.18.x'
Diffstat (limited to 'src/util')
-rw-r--r--src/util/UriUtil.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx
index 89d2a473a..174c977e1 100644
--- a/src/util/UriUtil.cxx
+++ b/src/util/UriUtil.cxx
@@ -42,7 +42,8 @@ const char *
uri_get_suffix(const char *uri)
{
const char *suffix = strrchr(uri, '.');
- if (suffix == nullptr)
+ if (suffix == nullptr || suffix == uri ||
+ suffix[-1] == '/' || suffix[-1] == '\\')
return nullptr;
++suffix;