Skip to content

Commit 04bd1b3

Browse files
committed
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 <[email protected]>
1 parent cdb5479 commit 04bd1b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libavcodec/htmlsubtitles.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
146146
if (stack[sptr].param[i][0])
147147
av_bprintf(dst, "%s", stack[sptr].param[i]);
148148
}
149-
} else if (!tagname[1] && strspn(tagname, "bisu") == 1) {
149+
} else if (tagname[0] && !tagname[1] && strspn(tagname, "bisu") == 1) {
150150
av_bprintf(dst, "{\\%c%d}", tagname[0], !tag_close);
151151
} else {
152152
unknown = 1;

0 commit comments

Comments
 (0)