diff options
author | Benno Fünfstück <benno.fuenfstueck@gmail.com> | 2015-11-14 21:18:41 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-12-15 21:49:53 +0100 |
commit | cae28117625153178cd91c85d13fc90acfc692be (patch) | |
tree | 70669bd46dfab44a1e3908562f970fe7dea72540 | |
parent | 09112c686972f032aa91bfbd119adbe4c4943158 (diff) |
fix mpd crash on invalid utf8 stream title
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/tag/TagString.cxx | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,5 @@ ver 0.19.12 (not yet released) +* fix assertion failure on malformed UTF-8 tag * fix build failure on non-Linux systems * fix LimitRTTIME in systemd unit file diff --git a/src/tag/TagString.cxx b/src/tag/TagString.cxx index 4f07cd62a..aab9bceb2 100644 --- a/src/tag/TagString.cxx +++ b/src/tag/TagString.cxx @@ -40,9 +40,9 @@ FindInvalidUTF8(const char *p, const char *const end) /* now call the other SequenceLengthUTF8() overload which also validates the continuations */ const size_t t = SequenceLengthUTF8(p); - assert(s == t); if (t == 0) return p; + assert(s == t); p += s; } |