git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
dbd3183
)
riff: Fix potential memleak.
author
Alex Converse
<alex.converse@gmail.com>
Thu, 9 Jun 2011 16:50:38 +0000
(09:50 -0700)
committer
Alex Converse
<alex.converse@gmail.com>
Thu, 9 Jun 2011 17:12:50 +0000
(10:12 -0700)
Make ff_get_wav_header() free existing extradata before allocing a new
buffer.
libavformat/riff.c
patch
|
blob
|
history
diff --git
a/libavformat/riff.c
b/libavformat/riff.c
index
e17980a
..
fe6cc55
100644
(file)
--- a/
libavformat/riff.c
+++ b/
libavformat/riff.c
@@
-509,6
+509,7
@@
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
}
codec->extradata_size = cbSize;
if (cbSize > 0) {
+ av_free(codec->extradata);
codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)
return AVERROR(ENOMEM);