avformat/mov: Fix potential integer overflow in mov_read_keys
authorSergey Volk <servolk@google.com>
Wed, 7 Sep 2016 21:05:35 +0000 (14:05 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 27 Sep 2016 11:42:11 +0000 (13:42 +0200)
commit7a3dc2f7b6c2fbe62aeed7839e736db395a6f76a
tree118bfc04f3a8d0ab570d8c1533b96060aa4f8340
parente91b7852dfae807b1996c30ec77e5bd7eb3a01a1
avformat/mov: Fix potential integer overflow in mov_read_keys

Actual allocation size is computed as (count + 1)*sizeof(meta_keys), so
we need to check that (count + 1) won't cause overflow.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 347cb14b7cba7560e53f4434b419b9d8800253e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c