]> git.sesse.net Git - ffmpeg/commitdiff
avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointe...
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 11:53:53 +0000 (12:53 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 6 Jan 2015 14:07:50 +0000 (15:07 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 63a8616cbfa4ac6192b604a857a423e1d1215453..75819570e9bb9e8c270e478a1bd8a0ba80faf6e8 100644 (file)
@@ -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);
     }