aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-06 12:53:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-09 17:19:10 +0100
commit918ed73b70a9ab7c48969256a399b2c2a4f0893c (patch)
tree4a09563a648816c8d151c4639e67d8fe8593c276 /libavformat/utils.c
parent2791eba1d78af65884b1b02d482c930b1d301e54 (diff)
downloadffmpeg-918ed73b70a9ab7c48969256a399b2c2a4f0893c.tar.gz
avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit bbfca8e84b0e69abba523d665536c0135fc1c00e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5da110da66..5a282a7ce7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2829,6 +2829,7 @@ int ff_alloc_extradata(AVCodecContext *avctx, int size)
int ret;
if (size < 0 || size >= INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
+ avctx->extradata = NULL;
avctx->extradata_size = 0;
return AVERROR(EINVAL);
}