tta: prevents overflows for 32bit integers in header.
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 29 Mar 2012 19:44:55 +0000 (12:44 -0700)
committerReinhard Tartler <siretart@tauware.de>
Fri, 4 May 2012 19:28:45 +0000 (21:28 +0200)
commit0e4bb0530f7d4cb1343499ee2bf0cb943d3b9a41
tree4158aca111345ad4ea2456bda04cc310d8e65d65
parent994c0efcc76ff90a2875472119b98fb2513e6f7a
tta: prevents overflows for 32bit integers in header.

This prevents sample_rate/data_length from going negative, which
caused various crashes and undefined behaviour further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit ac80b812cd177553339467ea12548d71c9ef6865)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavcodec/tta.c