summaryrefslogtreecommitdiff
path: root/libavcodec/microdvddec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-08-04 02:56:56 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-08-12 21:47:17 +0200
commitf91e7ec9dfb32dd27c2474de4f98a2e47126f7a7 (patch)
tree3ffa7fcfa4da9e83aadd709cbbee755a9f84f275 /libavcodec/microdvddec.c
parent00ae3498bf033e9d50608339c2ec4e244f860e13 (diff)
avcodec/microdvddec: limit style characters in parsing
Fixes: Timeout Fixes: 9293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MICRODVD_fuzzer-5643972541153280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/microdvddec.c')
-rw-r--r--libavcodec/microdvddec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c
index 4a34267793..dad0ec8a22 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)