Michael Niedermayer
66735ddd72
avcodec/htmlsubtitles: Replace very slow redundant sscanf() calls by cleaner and faster code
...
This reduces the worst case from O(n²) to O(n) time
Fixes Timeout
Fixes: 2127/clusterfuzz-testcase-minimized-6595787859427328
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4132218b87 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-06-22 03:06:42 +02:00
Michael Niedermayer
350f7f0bdf
avcodec/htmlsubtitles: Check for string truncation and return error
...
Fixes out of array access
Fixes: 1354/clusterfuzz-testcase-minimized-5520132195483648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f4ae3cce64 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-05-14 12:20:16 +02:00
Michael Niedermayer
8161ebbcc3
avcodec/htmlsubtitles: Fix reading one byte beyond the array
...
Fixes: fuzz-2-ffmpeg_SUBTITLE_AV_CODEC_ID_SUBRIP_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 04bd1b38ee )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-05-14 12:20:15 +02:00
Rodger Combs
d2d020bb32
avcodec/htmlsubtitles: handle leading whitespace before tag names
...
This fixes cases like `</ font>`.
Signed-off-by: Clément Bœsch <u@pkh.me >
2015-09-06 15:48:34 +02:00
Clément Bœsch
26786f43d7
avcodec/htmlsubtitles: drop avcodec dependency
2015-09-06 13:39:04 +02:00
Yayoi
50332f8a6b
avcodec/srtdec: factor out HTML parsing code
...
This code will be used in SAMI decoder in a later commit.
Signed-off-by: Clément Bœsch <u@pkh.me >
2015-09-06 13:07:44 +02:00