mms: Check memory allocation
Bug-Id: CID 1258462 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
committed by
Luca Barbato
parent
d450cb07d9
commit
93c1b04abf
@@ -104,6 +104,8 @@ int ff_mms_asf_header_parser(MMSContext *mms)
|
|||||||
mms->streams = av_fast_realloc(mms->streams,
|
mms->streams = av_fast_realloc(mms->streams,
|
||||||
&mms->nb_streams_allocated,
|
&mms->nb_streams_allocated,
|
||||||
(mms->stream_num + 1) * sizeof(MMSStream));
|
(mms->stream_num + 1) * sizeof(MMSStream));
|
||||||
|
if (!mms->streams)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
mms->streams[mms->stream_num].id = stream_id;
|
mms->streams[mms->stream_num].id = stream_id;
|
||||||
mms->stream_num++;
|
mms->stream_num++;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user