[BUG] encoders: WebVTT encoder generates invalid ## delimiter and malformed @import violating W3C specification
维护者通常 7 天内回复
评估
调研方向
两个缺陷都在 src/lib_ccx/ccx_encoders_webvtt.c 中:从 write_webvtt_header 开始,其中 STYLE 块以无效的 ## token 结尾,然后是大致第 278 行的 @import 调用,它被输出在任何 STYLE 块之外。将块终止符改为普通空行,并在 STYLE 块内将导入输出为 @import url("...");。完成意味着对示例输入运行 --webvtt --webvtt-css-rule=... 会生成 WebVTT 解析器可接受的输出,其中不含 ## 或裸 @import(。
由索引模型根据 Issue 内容生成。
描述
CCExtractor version: 0.94+ (git commit 77daaddb9f61a356e4a7732179212b192f9656b6)
Necessary information
- Is this a regression (i.e. did it work before)? NO
- What platform did you use? Linux (Ubuntu 24.04 LTS x86_64)
- What were the used arguments?
--webvtt --webvtt-css-rule="..." input.ts
Additional information
In src/lib_ccx/ccx_encoders_webvtt.c, write_webvtt_header outputs inline CSS styles when --webvtt-css-rule is provided:
if (context->webvtt_css_rule)
{
fdprintf(context->out->fh, "STYLE\n\n::cue {\n%s\n}\n##\n\n", context->webvtt_css_rule);
}
Under Section 4.3 of the W3C WebVTT specification, blocks (such as STYLE or NOTE) must terminate and separate from subsequent blocks or cues with a blank line (\n\n). Emitting ##\n\n injects an invalid token into the WebVTT stream. In browser video players (Chromium, Firefox), this token is treated as an invalid cue identifier or malformed block, causing parsers to reject the styling block or fail cue playback.
Additionally, at line 278:
fdprintf(context->out->fh, "@import(%s);\n\n", context->sentence_cap_file);
External stylesheets are written directly into the file body without being enclosed inside a STYLE block and without valid CSS @import url("...") syntax.
- 主要语言
- C
- 星标
- 919
- 派生
- 604
- 平均合并
- 13 天 12 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CCExtractor/ccextractor 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
CCExtractor/ccextractor#2478 ·
维护者通常 7 天内回复
-
[BUG] MXF: update_tid_lut() writes past tracks[32] onto nb_tracks, turning a file-supplied track id into the write offset可能已有人在做 @pranayr710 于 12 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
CCExtractor/ccextractor#2457 ·
维护者通常 7 天内回复
-
[Security] Heap buffer overflow (OOB read past GPAC sample buffer) in process_avc_sample() at mp4.c:99 when parsing a crafted MP4 file可能已有人在做 @yasar710 于 18 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
CCExtractor/ccextractor#2449 ·
维护者通常 7 天内回复
-
[BUG] DVB subtitle decoder: heap-buffer-overflow write in dvbsub_parse_clut_segment via unbounded entry_id可能已有人在做 @Aditya-Saroha 于 21 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
CCExtractor/ccextractor#2440 ·
维护者通常 7 天内回复
-
[BUG] Filename sequence expansion (`+`) panics on numeric values exceeding `i32::MAX`可能已有人在做 @NaitikVerma6776 于 12 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
CCExtractor/ccextractor#2402 ·
维护者通常 7 天内回复
查看 CCExtractor/ccextractor 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
python-pillow/Pillow#10590 ·
维护者通常 1 天内回复
-
增加kmod-nft-queue未关闭
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 80/100
ESPresense/ESPresense#2680 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
OpenPrinting/cups#1828 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
ImageMagick/ImageMagick#9134 ·
维护者通常 1 天内回复