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:18:39 +0000 (07:18 -0700)
commitd14696c99ccac12a052ce10e70859ffc0293ed6a
treedd709e347c6b232c288be56a5b28a3027e0e68a5
parentd0af7d5745f3e228293633faa9e57994f3308c31
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 b45ab61b24a8f2aeafdd4451491b1b30b7875ee5)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavformat/apetag.c