[FFmpeg-cvslog] riff: Fix freeing of random value.
Michael Niedermayer
git at videolan.org
Wed Dec 14 21:33:14 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 14 21:23:03 2011 +0100| [76b9a0961c33c9eb19b220c6f0edfbb3e79fcd59] | committer: Michael Niedermayer
riff: Fix freeing of random value.
Fixes Ticket752
Bug-found-by: Diana Elena Muscalu
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=76b9a0961c33c9eb19b220c6f0edfbb3e79fcd59
---
libavformat/riff.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 8c4d797..ea598d2 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -715,8 +715,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_freep(&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