X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmicrodvddec.c;h=777445997bb0efdabf747783e5b2bd5de19ab074;hb=3749eede66c3774799766b1f246afae8a6ffc9bb;hp=4a34267793735fc78074cdde0401d7d0298ae91f;hpb=04e4ab44d7c5eca9e1929b34d8fb966afc403e3a;p=ffmpeg diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c index 4a342677937..777445997bb 100644 --- a/libavcodec/microdvddec.c +++ b/libavcodec/microdvddec.c @@ -99,7 +99,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s) case 'Y': tag.persistent = MICRODVD_PERSISTENT_ON; case 'y': - while (*s && *s != '}') { + while (*s && *s != '}' && s - start < 256) { int style_index = indexof(MICRODVD_STYLES, *s); if (style_index >= 0) @@ -368,7 +368,7 @@ static int microdvd_init(AVCodecContext *avctx) alignment); } -AVCodec ff_microdvd_decoder = { +const AVCodec ff_microdvd_decoder = { .name = "microdvd", .long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle"), .type = AVMEDIA_TYPE_SUBTITLE,