swscale: enforce a minimum filtersize.
authorRonald S. Bultje <rsbultje@gmail.com>
Sat, 11 Feb 2012 16:42:28 +0000 (08:42 -0800)
committerReinhard Tartler <siretart@tauware.de>
Sun, 1 Apr 2012 16:33:26 +0000 (18:33 +0200)
commitce99c1bfb5968ea680c6c48a52c407677db2fe82
treef44bb3ff4de8508162f07040ea87a236ed06ed6a
parentfd3af2950ace3b78e3003432873509dd3544f982
swscale: enforce a minimum filtersize.

At very small dimensions, this calculation could lead to zero-sized
filters, which leads to uninitialized output, zero-sized allocations,
loop overflows in SIMD that uses do{..}while(i++<filtersize); instead
of for(i=0;i<filtersize;i++){..} and several other similar failures.
Therefore, require a minimum filtersize of 1.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libswscale/utils.c