aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-06 12:53:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-06 18:28:35 +0100
commit63b5cb1fb0cd3182bdc1a2a4a0b8b1193b4029b6 (patch)
tree64455a6b65cf549554a507cfc81bcc7213af689d
parent7959b9a0f3f9dad15db480417ccfde7d37019b4b (diff)
downloadffmpeg-63b5cb1fb0cd3182bdc1a2a4a0b8b1193b4029b6.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>
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c4f745c024..c43050f09c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2954,6 +2954,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);
}