media: atomisp: prevent integer overflow in sh_css_set_black_frame()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 1 Sep 2022 05:20:09 +0000 (07:20 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 08:02:57 +0000 (10:02 +0200)
commit3ad290194bb06979367622e47357462836c1d3b4
treec16031abf63a99e90c87888554f1a56a41f54fae
parentba6856aab1a7edebf1a27c0b6bffaa8a6ea80de7
media: atomisp: prevent integer overflow in sh_css_set_black_frame()

The "height" and "width" values come from the user so the "height * width"
multiplication can overflow.

Link: https://lore.kernel.org/r/YxBBCRnm3mmvaiuR@kili
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/sh_css_params.c