diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-06 22:24:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-07 01:01:19 +0100 |
commit | c719cd6cf79ec21d974b81ba874580f4b8e9eb90 (patch) | |
tree | a89181aa2a88ad20fe51d0da74e9947471ecfa4a /libavcodec | |
parent | 20db54906f558796596ba1d03b56dedf0aa25f8c (diff) | |
download | ffmpeg-c719cd6cf79ec21d974b81ba874580f4b8e9eb90.tar.gz |
avcodec/microdvddec: Check for string end in 'P' case
Fixes out of array read
Fixes: a9502b60f4cecc19475382aee255f73c/asan_heap-oob_1e87fba_2548_a8ad47f6dde36644fe9cdc444d4632d0.sub
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/microdvddec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c index 96034a042a..9035892205 100644 --- a/libavcodec/microdvddec.c +++ b/libavcodec/microdvddec.c @@ -164,6 +164,8 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s) /* Position */ case 'P': + if (!*s) + break; tag.persistent = MICRODVD_PERSISTENT_ON; tag.data1 = (*s++ == '1'); if (*s != '}') |