tiff: in add_string_metadata() check the count more completely

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: limit phase_shift to a less insane value.

This prevents potential crashes and out of memory issues if
the user manually sets such insane values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr/ build_filter: use av_calloc() fix buffer overflow

Fixes integer & buffer overflow

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>