Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
michaelni committed Nov 12, 2016
1 parent cdb5479 commit 04bd1b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavcodec/htmlsubtitles.c
Expand Up @@ -146,7 +146,7 @@ void ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
if (stack[sptr].param[i][0])
av_bprintf(dst, "%s", stack[sptr].param[i]);
}
} else if (!tagname[1] && strspn(tagname, "bisu") == 1) {
} else if (tagname[0] && !tagname[1] && strspn(tagname, "bisu") == 1) {
av_bprintf(dst, "{\\%c%d}", tagname[0], !tag_close);
} else {
unknown = 1;
Expand Down

0 comments on commit 04bd1b3

Please sign in to comment.