From: Clément Bœsch Date: Sun, 19 Mar 2017 14:59:49 +0000 (+0100) Subject: Merge commit 'a4b1b5aa281cacde8351d9947b54ccf82ff10cd0' X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=83706367e2b5693e093954997b19af5031b8e2ff;p=ffmpeg Merge commit 'a4b1b5aa281cacde8351d9947b54ccf82ff10cd0' * commit 'a4b1b5aa281cacde8351d9947b54ccf82ff10cd0': wc3movie: Drop unused cruft Merged-by: Clément Bœsch --- 83706367e2b5693e093954997b19af5031b8e2ff diff --cc libavformat/wc3movie.c index 642dcbbf7e8,f46b8c2f09b..d8fc18eb5fc --- a/libavformat/wc3movie.c +++ b/libavformat/wc3movie.c @@@ -250,19 -246,12 +247,18 @@@ static int wc3_read_packet(AVFormatCont else { int i = 0; av_log (s, AV_LOG_DEBUG, "Subtitle time!\n"); + if (i >= size || av_strnlen(&text[i + 1], size - i - 1) >= size - i - 1) + return AVERROR_INVALIDDATA; av_log (s, AV_LOG_DEBUG, " inglish: %s\n", &text[i + 1]); i += text[i] + 1; + if (i >= size || av_strnlen(&text[i + 1], size - i - 1) >= size - i - 1) + return AVERROR_INVALIDDATA; av_log (s, AV_LOG_DEBUG, " doytsch: %s\n", &text[i + 1]); i += text[i] + 1; + if (i >= size || av_strnlen(&text[i + 1], size - i - 1) >= size - i - 1) + return AVERROR_INVALIDDATA; av_log (s, AV_LOG_DEBUG, " fronsay: %s\n", &text[i + 1]); } - #endif break; case AUDI_TAG: