Re: [PATCH v2] clk: bcm: rpi: Fix off by one in raspberrypi_discover_clocks()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 21.04.23 um 12:41 schrieb Dan Carpenter:
Smatch detected an off by one in this code:
     drivers/clk/bcm/clk-raspberrypi.c:374 raspberrypi_discover_clocks()
     error: buffer overflow 'data->hws' 16 <= 16

The data->hws[] array has RPI_FIRMWARE_NUM_CLK_ID elements so the >
comparison needs to changed to >=.

Fixes: 12c90f3f27bb ("clk: bcm: rpi: Add variant structure")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Reviewed-by: Stefan Wahren <stefan.wahren@xxxxxxxx>



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux