X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmicrodvddec.c;h=dad0ec8a22acd1d5685e9bbe60dee5c05b589b57;hb=339af976b6fd9c05d1e75e75a5323efdb3d6afa1;hp=4a34267793735fc78074cdde0401d7d0298ae91f;hpb=b13a1210a242d2b3177592ec8687c6f579bff156;p=ffmpeg diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c index 4a342677937..dad0ec8a22a 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)