id3v2: catch avio_read errors in check_tag
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Mon, 11 May 2015 18:07:49 +0000 (20:07 +0200)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 14 May 2015 17:13:49 +0000 (19:13 +0200)
commit66b95ee4df804cb18dd39def251cc967f1abf808
treed03767ec9effcc3d66ea0ad8d5234cfe42ffda4f
parent0f7e67be3a56e20abcabf9e6698935e6188e7282
id3v2: catch avio_read errors in check_tag

Since len is an unsigned int, the comparison is currently treated as
unsigned and thus ignores all errors from avio_read.

Thus cast len to int, which is unproblematic, because at that point len
is between 0 and 4.

This fixes 'Conditional jump or move depends on uninitialised value'
valgrind warnings in is_tag.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0382c94f13b4b20456b7259e90b170dc020419b8)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/id3v2.c