mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 14:01:27 +00:00
avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
da0dadbee4
commit
bbfca8e84b
@ -2843,6 +2843,7 @@ int ff_alloc_extradata(AVCodecContext *avctx, int size)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (size < 0 || size >= INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
|
if (size < 0 || size >= INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
|
||||||
|
avctx->extradata = NULL;
|
||||||
avctx->extradata_size = 0;
|
avctx->extradata_size = 0;
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user