qemu/hw/ssi
Cédric Le Goater 13951ccfcd aspeed/smc: Fix possible integer overflow
Coverity reports a possible integer overflow because routine
aspeeed_smc_hclk_divisor() has a codepath returning 0, which could
lead to an integer overflow when computing variable 'hclk_shift' in
the caller aspeed_smc_dma_calibration().

The value passed to aspeed_smc_hclk_divisor() is always between 0 and
15 and, in this case, there is always a matching hclk divisor. Remove
the return 0 and use g_assert_not_reached() instead.

Fixes: Coverity CID 1547822
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2024-07-21 07:46:38 +02:00
..
aspeed_smc.c aspeed/smc: Fix possible integer overflow 2024-07-21 07:46:38 +02:00
bcm2835_spi.c hw/ssi: Implement BCM2835 SPI Controller 2024-02-02 13:51:59 +00:00
ibex_spi_host.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
imx_spi.c hw/misc/imx: Replace sprintf() by snprintf() 2024-04-25 12:48:12 +02:00
Kconfig hw/ssi: Implement BCM2835 SPI Controller 2024-02-02 13:51:59 +00:00
meson.build hw/ssi: Implement BCM2835 SPI Controller 2024-02-02 13:51:59 +00:00
mss-spi.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
npcm7xx_fiu.c hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
npcm_pspi.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
omap_spi.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
pl022.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
sifive_spi.c hw/ssi/sifive_spi.c: spelling: reigster 2023-01-17 10:02:37 +01:00
ssi.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
stm32f2xx_spi.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
trace-events aspeed/smc: support 64 bits dma dram address 2024-06-16 21:08:54 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xilinx_spi.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
xilinx_spips.c hw/ssi: Constify VMState 2023-12-30 07:38:06 +11:00
xlnx-versal-ospi.c xlnx-versal-ospi: disable reentrancy detection for iomem_dac 2024-02-27 13:01:41 +00:00