Michael Niedermayer
14b834c45a
avcodec/htmlsubtitles: Factor open brace handling into its own function
...
Suggested-by: wm4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-06-18 14:50:35 +02:00
Michael Niedermayer
4132218b87
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 >
2017-06-18 14:50:30 +02:00
Michael Niedermayer
f4ae3cce64
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 >
2017-05-08 17:02:02 +02:00
Michael Niedermayer
04bd1b38ee
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 >
2016-11-12 03:23:03 +01: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