[FFmpeg-cvslog] apetag: make sure avio_get_str() doesn't read more than it should.

Anton Khirnov git at videolan.org
Mon Jul 2 21:24:14 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Jun 26 18:49:04 2012 +0200| [f2e175c7563a1cd4780586d28929de67d7b8a426] | committer: Anton Khirnov

apetag: make sure avio_get_str() doesn't read more than it should.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2e175c7563a1cd4780586d28929de67d7b8a426
---

 libavformat/apetag.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index 68c987e..e5c839e 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -59,7 +59,7 @@ static int ape_tag_read_field(AVFormatContext *s)
         AVStream *st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
-        avio_get_str(pb, INT_MAX, filename, sizeof(filename));
+        avio_get_str(pb, size, filename, sizeof(filename));
         st->codec->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
         if (!st->codec->extradata)
             return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list