From: Guennadi Liakhovetski Date: Tue, 8 May 2012 14:46:44 +0000 (-0300) Subject: [media] V4L: mx2-camera: avoid overflowing 32-bits X-Git-Tag: v3.5-rc1~104^2~106 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67e86524b907ed2189f4875cdbe7a5249c71ebb2;p=pandora-kernel.git [media] V4L: mx2-camera: avoid overflowing 32-bits In mx2_camera_try_fmt(), when applying i.MX25 restrictions to frame sizes, the height is checked to be <= 0xffff. But later an integer multiplication height * 4 * 0x3ffff is performed, which will overflow even for bounded height values. This patch switches to using 64-bit multiplication and division to avoid overflowing. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed