linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] fix potential integer overflows
@ 2018-01-30  0:30 Gustavo A. R. Silva
  2018-01-30  0:30 ` [PATCH 1/8] rtl2832: fix potential integer overflow in rtl2832_set_frontend Gustavo A. R. Silva
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-30  0:30 UTC (permalink / raw)
  To: linux-media, linux-rockchip, lnux-arm-kernel, inux-kernel
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Jacob chen, Heiko Stuebner,
	Antti Palosaari, Ramesh Shanmugasundaram, Gustavo A. R. Silva

This patchset aims to fix potential integer overflows reported
by Coverity.

In all cases the potential overflowing expressions are evaluated
using 32-bit arithmetic before being used in contexts that expect
a 64-bit arithmetic. So a cast to the proper type was added to each
of those expressions in order to avoid any potential integer overflow.

This also gives the compiler complete information about the proper
arithmetic for each expression and improves code quality.

Addresses the following Coverity IDs reported as
"Unintentional integer overflow" issues:

200604, 1056807, 1056808, 1271223,
1324146, 1392628, 1392630, 1446589,
1454996, 1458347.

Thank you

Gustavo A. R. Silva (8):
  rtl2832: fix potential integer overflow
  dvb-frontends: ves1820: fix potential integer overflow
  i2c: max2175: fix potential integer overflow in max2175_set_nco_freq
  i2c: ov9650: fix potential integer overflow in
    __ov965x_set_frame_interval
  pci: cx88-input: fix potential integer overflow
  rockchip/rga: fix potential integer overflow in rga_buf_map
  platform: sh_veu: fix potential integer overflow in
    sh_veu_colour_offset
  platform: vivid-cec: fix potential integer overflow in
    vivid_cec_pin_adap_events

 drivers/media/dvb-frontends/rtl2832.c         | 4 ++--
 drivers/media/dvb-frontends/ves1820.c         | 2 +-
 drivers/media/i2c/max2175.c                   | 2 +-
 drivers/media/i2c/ov9650.c                    | 2 +-
 drivers/media/pci/cx88/cx88-input.c           | 4 ++--
 drivers/media/platform/rockchip/rga/rga-buf.c | 2 +-
 drivers/media/platform/sh_veu.c               | 4 ++--
 drivers/media/platform/vivid/vivid-cec.c      | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-02-02  9:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30  0:30 [PATCH 0/8] fix potential integer overflows Gustavo A. R. Silva
2018-01-30  0:30 ` [PATCH 1/8] rtl2832: fix potential integer overflow in rtl2832_set_frontend Gustavo A. R. Silva
2018-01-30  0:31 ` [PATCH 2/8] dvb-frontends: ves1820: fix potential integer overflow Gustavo A. R. Silva
2018-01-30  0:31 ` [PATCH 3/8] i2c: max2175: fix potential integer overflow in max2175_set_nco_freq Gustavo A. R. Silva
2018-01-30  0:32 ` [PATCH 4/8] i2c: ov9650: fix potential integer overflow in __ov965x_set_frame_interval Gustavo A. R. Silva
2018-02-02  9:22   ` Sakari Ailus
2018-01-30  0:32 ` [PATCH 5/8] pci: cx88-input: fix potential integer overflow Gustavo A. R. Silva
2018-01-30  0:32 ` [PATCH 6/8] rockchip/rga: fix potential integer overflow in rga_buf_map Gustavo A. R. Silva
2018-01-30  0:33 ` [PATCH 7/8] platform: sh_veu: fix potential integer overflow in sh_veu_colour_offset Gustavo A. R. Silva
2018-01-30  0:33 ` [PATCH 8/8] platform: vivid-cec: fix potential integer overflow in vivid_cec_pin_adap_events Gustavo A. R. Silva
2018-01-30  7:21   ` Hans Verkuil
2018-01-30  8:51     ` Gustavo A. R. Silva
2018-01-30  9:57       ` Hans Verkuil
2018-01-30 10:55         ` Gustavo A. R. Silva
2018-01-30 11:15           ` Hans Verkuil
2018-01-30 11:43             ` Gustavo A. R. Silva
2018-01-30 11:50               ` Hans Verkuil
2018-01-30 11:57                 ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).