Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-17 22:45:59 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-17 22:45:59 +0400
commitf03c0f6afcb1360c95e92cf9278a8f43ca5cdb9f (patch)
treec895b89d7e995033cd59226606ae1527ce74532b /libavformat/ffmdec.c
parenta0e0e1e19254d094d7d2cacaee9721fab19ecd21 (diff)
ffmdec: check av_new_packet() return value
Fixes CID733711 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r--libavformat/ffmdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index d4e605680a..028f1ee797 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -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);