[FFmpeg-cvslog] riff: fix invalid av_freep() calls on EOF in ff_read_riff_info

Janne Grunau git at videolan.org
Mon Jan 23 01:18:13 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Thu Jan  5 20:15:53 2012 +0100| [15cea3695daf3f6363794594982e3816ddc8d90b] | committer: Janne Grunau

riff: fix invalid av_freep() calls on EOF in ff_read_riff_info

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

 libavformat/riff.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 4caac80..99a8033 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -669,8 +669,7 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
         AV_WL32(key, chunk_code);
 
         if (avio_read(pb, value, chunk_size) != chunk_size) {
-            av_freep(key);
-            av_freep(value);
+            av_free(value);
             av_log(s, AV_LOG_ERROR, "premature end of file while reading INFO tag\n");
             return AVERROR_INVALIDDATA;
         }



More information about the ffmpeg-cvslog mailing list