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 63a8616..7581957 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);
     }