summaryrefslogtreecommitdiff
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-06 15:07:50 +0100
commitbbfca8e84b0e69abba523d665536c0135fc1c00e (patch)
treecf42de39fe3e1d8c77024882a9e151588edb99ec /libavformat/utils.c
parentda0dadbee4e9ba7f45dc668b5da1f8c2d684d2e4 (diff)
avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
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 63a8616cbf..75819570e9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2843,6 +2843,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);
}