[PATCH] serial: samsung: fix buffer size for clk_name

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Mon Jan 16 08:16:59 PST 2023


On 16/01/2023 15:16, Alexey V. Vissarionov wrote:
> Although very unlikely, the 'clk_num' value may be as big as
> 2**32 - 1 (uint32_max), 

How it could be that high? Code has num_clks defined from 1 to 4 and it
is used as strict boundary for the loop so how it could end up here with
higher value?

s3c24xx_serial_getsource() also returns value & with mask, so up to 4
max. This does not look like real issue but some change to satisfy
static code analyzers, so I don't think it's correct approach.

Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list