summaryrefslogtreecommitdiff
path: root/libavcodec/htmlsubtitles.c
Commit message (Collapse)AuthorAge
* avcodec/htmlsubtitles: Avoid locale dependant isdigit()Michael Niedermayer2019-09-11
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner ↵Kevin Backhouse via RT2019-02-17
| | | | | | | | | loop for handling braces Fixes: [Semmle Security Reports #19439] Fixes: dos_sscanf2.mkv Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/htmlsubtitles: Fixes denial of service due to use of sscanf in inner ↵Kevin Backhouse via RT2019-02-17
| | | | | | | | | loop for tag scaning Fixes: [Semmle Security Reports #19438] Fixes: dos_sscanf1.mkv Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/htmlsubtitles: fix format specifier in av_bprintf callsJames Almer2017-08-03
|
* lavc/htmlsubtitles: reindent after previous commitsClément Bœsch2017-08-01
|
* lavc/htmlsubtitles: handle colors starting with many '#'Clément Bœsch2017-08-01
|
* lavc/htmlsubtitles: improve line breaks handlingClément Bœsch2017-08-01
|
* lavc/htmlsubtitles: improve handling broken garbageClément Bœsch2017-08-01
| | | | | | | | | | | | | | | | | | | | This commit switches off forced correct nesting of tags and only keeps it for font tags. See long explanations in the code for the rationale. This results in various FATE changes which I'll explain here: - various swapping in font attributes, this is mostly noise due to the old reverse stack way of printing them. The new one is more correct as the last attribute takes over the previous ones. - unrecognized tags disappears - invalid tags that were previously displayed aren't anymore (instead, we have a warning). This is better for the end user The main benefit of this commit is to be more tolerant to error, leading to a better handling of badly nested tags or random wrong formatting for the end user.
* lavc/htmlsubtitles: simplify 1-char tags case insensitive testClément Bœsch2017-07-26
|
* avcodec/htmlsubtitles: Be a bit more picky on syntaxMichael Niedermayer2017-07-18
| | | | | | | | | | | 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>
* libavcodec/htmlsubtitles.c: make tags case-insensitiveDongHoon Kang2017-07-07
| | | | | Signed-off-by: DongHoon Kang <nanuda.kang@gmail.com> Signed-off-by: Clément Bœsch <u@pkh.me>
* htmlsubtitles: support <br> tagwm42017-07-06
| | | | | | | Some .srt files use this tag. (An alternative implementation would be correctly ignoring unknown tags, and treating them as whitespace. libass can do automatic line wrapping.)
* avcodec/htmlsubtitles: Factor open brace handling into its own functionMichael Niedermayer2017-06-18
| | | | | Suggested-by: wm4 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/htmlsubtitles: Replace very slow redundant sscanf() calls by cleaner ↵Michael Niedermayer2017-06-18
| | | | | | | | | | | 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>
* avcodec/htmlsubtitles: Check for string truncation and return errorMichael Niedermayer2017-05-08
| | | | | | | | 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>
* avcodec/htmlsubtitles: Fix reading one byte beyond the arrayMichael Niedermayer2016-11-12
| | | | | | | 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>
* avcodec/htmlsubtitles: handle leading whitespace before tag namesRodger Combs2015-09-06
| | | | | | This fixes cases like `</ font>`. Signed-off-by: Clément Bœsch <u@pkh.me>
* avcodec/htmlsubtitles: drop avcodec dependencyClément Bœsch2015-09-06
|
* avcodec/srtdec: factor out HTML parsing codeYayoi2015-09-06
This code will be used in SAMI decoder in a later commit. Signed-off-by: Clément Bœsch <u@pkh.me>