mirror of https://git.ffmpeg.org/ffmpeg.git
ffmdec: check av_new_packet() return value
Fixes CID733711 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a0e0e1e192
commit
f03c0f6afc
|
@ -386,7 +386,9 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
|
||||
duration = AV_RB24(ffm->header + 5);
|
||||
|
||||
av_new_packet(pkt, size);
|
||||
if (av_new_packet(pkt, size) < 0) {
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
pkt->stream_index = ffm->header[0];
|
||||
if ((unsigned)pkt->stream_index >= s->nb_streams) {
|
||||
av_log(s, AV_LOG_ERROR, "invalid stream index %d\n", pkt->stream_index);
|
||||
|
|
Loading…
Reference in New Issue