fix mpd crash on invalid utf8 stream title

This commit is contained in:
Benno Fünfstück 2015-11-14 21:18:41 +01:00 committed by Max Kellermann
parent 09112c6869
commit cae2811762
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -1,4 +1,5 @@
ver 0.19.12 (not yet released) ver 0.19.12 (not yet released)
* fix assertion failure on malformed UTF-8 tag
* fix build failure on non-Linux systems * fix build failure on non-Linux systems
* fix LimitRTTIME in systemd unit file * fix LimitRTTIME in systemd unit file

View File

@ -40,9 +40,9 @@ FindInvalidUTF8(const char *p, const char *const end)
/* now call the other SequenceLengthUTF8() overload /* now call the other SequenceLengthUTF8() overload
which also validates the continuations */ which also validates the continuations */
const size_t t = SequenceLengthUTF8(p); const size_t t = SequenceLengthUTF8(p);
assert(s == t);
if (t == 0) if (t == 0)
return p; return p;
assert(s == t);
p += s; p += s;
} }