apetag: Fix APE tag size check
authorKaterina Barone-Adesi <katerinab@gmail.com>
Mon, 15 Sep 2014 23:40:24 +0000 (01:40 +0200)
committerDiego Biurrun <diego@biurrun.de>
Wed, 17 Sep 2014 14:22:08 +0000 (07:22 -0700)
commit56ac2cbd0464e0146e62c91843e2b1f5e0908504
tree0f33e300ff62461d09fd179904fe60b5c36e3e7b
parent606bbd50b1ebaa3c040fc7cab84f1d8bb5d3d248
apetag: Fix APE tag size check

The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

(cherry picked from commit d14696c99ccac12a052ce10e70859ffc0293ed6a)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavformat/apetag.c