Re: [PATCH -next v2] ALSA: pcm: replace simple_strtoul to kstrtoul

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



On Sat, 31 Aug 2024 10:06:39 +0200,
Hongbo Li wrote:
> 
> As mentioned in [1], "...simple_strtol(), simple_strtoll(),
> simple_strtoul(), and simple_strtoull() functions explicitly
> ignore overflows, which may lead to unexpected results in callers."
> Hence, the use of those functions is discouraged.
> 
> This patch replace the use of the simple_strtoul with the safer
> alternatives kstrtoul.
> 
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull
> 
> Signed-off-by: Hongbo Li <lihongbo22@xxxxxxxxxx>
> 
> ---
> v2:
>   - Avoid introducing the ret variable, suggested by Takashi.
> 
> v1: https://lore.kernel.org/all/1e4bee4b-023c-40e2-ac4a-f71299fa2efd@xxxxxxxxxx/T/

Applied now.  Thanks.


Takashi




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux