diff options
author | Luca Barbato | 2015-06-27 23:19:36 +0200 |
---|---|---|
committer | Luca Barbato | 2015-06-28 10:27:19 +0200 |
commit | 8a26ae5f94e613dbf7eb8e3c60462e966e409cdc (patch) | |
tree | 95db235c4214bfe46e450e5781c1b215697be263 /libavformat/mpjpegdec.c | |
parent | b08569a23948db107e5e6175cd4c695427d5339d (diff) |
mpjpeg: Check stream allocation
Bug-Id: CID 1308152
Diffstat (limited to 'libavformat/mpjpegdec.c')
-rw-r--r-- | libavformat/mpjpegdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c index e2a2ece9c4..fda4c38680 100644 --- a/libavformat/mpjpegdec.c +++ b/libavformat/mpjpegdec.c @@ -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; |