avcodec/htmlsubtitles: Be a bit more picky on syntax
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 1 Jul 2017 22:09:42 +0000 (00:09 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 13 May 2019 22:17:29 +0000 (00:17 +0200)
commitabdbbe895838a55a404d54f7b26a4aca23d19577
tree4b0d04e1233302527111578c4266dc78a1718f96
parent3a6bcc059cc61b13502401ae34a5aeef016ae061
avcodec/htmlsubtitles: Be a bit more picky on syntax

This reduces the number of strstr() calls per byte
This diasalows empty tags like '< >' as well as '<' in tags like '<ab<cd<<ef>'

Fixes timeout
Fixes: 1817/clusterfuzz-testcase-minimized-5104230530547712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c61715e2c505c15a5cfc9eab18b4311a6504055a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/htmlsubtitles.c