From b0517467c0b60b9e9e1a660859727e1f512c70d0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 7 Jan 2014 04:08:18 +0100 Subject: [PATCH] avformat/webvttdec: Dont skip over a never checked byte after --> Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f49667d83db_3396_WebVTT_capability_tester.vtt Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- libavformat/webvttdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index 065448532d..e457e8f6d2 100644 --- a/libavformat/webvttdec.c +++ b/libavformat/webvttdec.c @@ -119,7 +119,7 @@ static int webvtt_read_header(AVFormatContext *s) break; if (!(p = strstr(p, "-->"))) break; - p += 3; + p += 2; do p++; while (*p == ' ' || *p == '\t'); if ((ts_end = read_ts(p)) == AV_NOPTS_VALUE) break;