[FFmpeg-cvslog] Merge commit 'a4b1b5aa281cacde8351d9947b54ccf82ff10cd0'
Clément Bœsch
git at videolan.org
Sun Mar 19 17:00:01 EET 2017
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Mar 19 15:59:49 2017 +0100| [83706367e2b5693e093954997b19af5031b8e2ff] | committer: Clément Bœsch
Merge commit 'a4b1b5aa281cacde8351d9947b54ccf82ff10cd0'
* commit 'a4b1b5aa281cacde8351d9947b54ccf82ff10cd0':
wc3movie: Drop unused cruft
Merged-by: Clément Bœsch <u at pkh.me>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83706367e2b5693e093954997b19af5031b8e2ff
---
libavformat/wc3movie.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 642dcbb..d8fc18e 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -242,9 +242,6 @@ static int wc3_read_packet(AVFormatContext *s,
case TEXT_TAG:
/* subtitle chunk */
-#if 0
- avio_skip(pb, size);
-#else
if ((unsigned)size > sizeof(text) || (ret = avio_read(pb, text, size)) != size)
ret = AVERROR(EIO);
else {
@@ -262,7 +259,6 @@ static int wc3_read_packet(AVFormatContext *s,
return AVERROR_INVALIDDATA;
av_log (s, AV_LOG_DEBUG, " fronsay: %s\n", &text[i + 1]);
}
-#endif
break;
case AUDI_TAG:
======================================================================
diff --cc libavformat/wc3movie.c
index 642dcbb,f46b8c2..d8fc18e
--- 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:
More information about the ffmpeg-cvslog
mailing list