avutil/timecode: Fix fps check
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Dec 2015 02:14:11 +0000 (03:14 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 6 Dec 2015 11:40:51 +0000 (12:40 +0100)
commit4ecdd45d24103fc4073687c75a537b77b55b2bf9
tree6e4ab05a4c3bc85b0df4c04bbcb548d74b99414c
parentf91e71cc68fb1e82de0d1b2e5b437af880f3254b
avutil/timecode: Fix fps check

The fps variable is explicitly set to -1 in case of some errors, the check must
thus be signed or the code setting it needs to use 0 as error code
the type of the field could be changed as well but its in an installed header

Fixes: integer overflow
Fixes: 9982cc157b1ea90429435640a989122f/asan_generic_3ad004a_3799_22cf198d9cd09928e2d9ad250474fa58.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b46dcd5209a77254345ae098b83a872634c5591b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/timecode.c