diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-22 16:11:11 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-22 17:09:56 +0100 |
commit | b1fcdc08ceb5df69fac34aa0d57c56905d32b8b4 (patch) | |
tree | 3d16b192feac83cd9e9dd63ec322b05d8dcc5640 /libavformat/nutdec.c | |
parent | 3511d4fc9784d5fbb024dce68ca7a0d7fdd74663 (diff) | |
download | ffmpeg-b1fcdc08ceb5df69fac34aa0d57c56905d32b8b4.tar.gz |
nut: Fix unchecked allocations
CC: libav-stable@libav.org
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r-- | libavformat/nutdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index cc5869ed48..6328549d7a 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -532,6 +532,7 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr) AVFormatContext *s = nut->avf; AVIOContext *bc = s->pb; int64_t end, tmp; + int ret; nut->last_syncpoint_pos = avio_tell(bc) - 8; @@ -553,7 +554,9 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr) *ts = tmp / s->nb_streams * av_q2d(nut->time_base[tmp % s->nb_streams]) * AV_TIME_BASE; - ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts); + + if ((ret = ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts)) < 0) + return ret; return 0; } |