Merge commit '8a26ae5f94e613dbf7eb8e3c60462e966e409cdc'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Jun 2015 11:41:40 +0000 (13:41 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Jun 2015 11:41:44 +0000 (13:41 +0200)
* commit '8a26ae5f94e613dbf7eb8e3c60462e966e409cdc':
  mpjpeg: Check stream allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpjpegdec.c

index 845e95c..b8281fc 100644 (file)
@@ -123,6 +123,8 @@ static int mpjpeg_read_header(AVFormatContext *s)
         return AVERROR_INVALIDDATA;
 
     st = avformat_new_stream(s, NULL);
+    if (!st)
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = AV_CODEC_ID_MJPEG;