[FFmpeg-cvslog] avcodec/microdvddec: Check for string end in 'P' case
Michael Niedermayer
git at videolan.org
Thu Nov 26 17:55:01 CET 2015
ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov 6 22:24:23 2015 +0100| [5bb599d0c013cfdb9d8ac84b34df87fe91048dd2] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit c719cd6cf79ec21d974b81ba874580f4b8e9eb90)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bb599d0c013cfdb9d8ac84b34df87fe91048dd2
---
libavcodec/microdvddec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c
index 96034a0..9035892 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 != '}')
More information about the ffmpeg-cvslog
mailing list