diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 12:53:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 16:10:42 +0100 |
commit | 3b17c1e13e45b17ca9ec87360db6752b2f902f04 (patch) | |
tree | b7eea7c08ce8c6695bbe27495003afc04e1d41ae | |
parent | 8abe459ac6ce26654986ac9df8d933cbe462199b (diff) | |
download | ffmpeg-3b17c1e13e45b17ca9ec87360db6752b2f902f04.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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 75f6639e6e..738355f45a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2865,6 +2865,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); } |