[FFmpeg-cvslog] avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Michael Niedermayer
git at videolan.org
Tue Jan 20 03:36:12 CET 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Jan 6 12:53:53 2015 +0100| [3b17c1e13e45b17ca9ec87360db6752b2f902f04] | committer: Michael Niedermayer
avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit bbfca8e84b0e69abba523d665536c0135fc1c00e)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b17c1e13e45b17ca9ec87360db6752b2f902f04
---
libavformat/utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 75f6639..738355f 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);
}
More information about the ffmpeg-cvslog
mailing list