Merge commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8'

* commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8':
  eatgv: Check memory allocation

Conflicts:
	libavcodec/eatgv.c

See: a5615b82eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-01 01:44:44 +02:00
commit 10531d48a0
1 changed files with 3 additions and 2 deletions

View File

@ -173,9 +173,10 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
/* allocate codebook buffers as necessary */
if (num_mvs > s->num_mvs) {
if (av_reallocp_array(&s->mv_codebook, num_mvs, sizeof(*s->mv_codebook))) {
int err = av_reallocp_array(&s->mv_codebook, num_mvs, sizeof(*s->mv_codebook));
if (err < 0) {
s->num_mvs = 0;
return AVERROR(ENOMEM);
return err;
}
s->num_mvs = num_mvs;
}