ffmpeg | branch: master | Vittorio Giovara <vittorio.giov...@gmail.com> | Sun May 31 14:53:51 2015 +0200| [7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8] | committer: Luca Barbato
eatgv: Check memory allocation > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8 --- libavcodec/eatgv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index c400b56..a77c4c3 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -173,7 +173,9 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame, /* allocate codebook buffers as necessary */ if (num_mvs > s->num_mvs) { - s->mv_codebook = av_realloc(s->mv_codebook, num_mvs*2*sizeof(int)); + int err = av_reallocp(&s->mv_codebook, num_mvs * 2 * sizeof(int)); + if (err < 0) + return err; s->num_mvs = num_mvs; } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog