From cae28117625153178cd91c85d13fc90acfc692be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sat, 14 Nov 2015 21:18:41 +0100 Subject: fix mpd crash on invalid utf8 stream title --- src/tag/TagString.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3