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-09 17:18:40 +0100
commit45069582897c0b59ec7c2ffd0f933b9fc3c2926e (patch)
treef001336d8f1f7f47643a472968f6e0012d5a285c
parent63007901446f13ab3b04a66fee856c4f58c08778 (diff)
downloadffmpeg-45069582897c0b59ec7c2ffd0f933b9fc3c2926e.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 6ff4570f5c..b1f7909ae0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2792,6 +2792,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);
}