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>
Fri, 9 Jan 2015 16:18:40 +0000 (17:18 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bbfca8e84b0e69abba523d665536c0135fc1c00e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 6ff4570..b1f7909 100644 (file)
@@ -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);
     }