[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e4107d75-4b69-4b7d-827c-af92b913d342@linuxfoundation.org>
Date: Sat, 7 Feb 2026 09:04:15 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Sumeet Pawnikar <sumeet4linux@...il.com>, trenn@...e.com,
shuah@...nel.org, jwyatt@...hat.com, jkacur@...hat.com,
linux-pm@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] tools/power/cpupower: Replace strcpy/strcat with snprintf
in powercap.c
On 1/31/26 09:42, Sumeet Pawnikar wrote:
> Replace all unsafe strcpy() and strcat() calls with snprintf() in
> powercap.c to prevent potential buffer overflow vulnerabilities.
> The snprintf() function performs automatic bounds checking to ensure
> the destination buffer is not overflowed.
Why snprintf() - why not use strncpy() and strncat()
>
> No functional change.
Why isn't this a functional change? You are changing the code to use
a different system call? How did you test this patch?
thanks,
-- Shuah
Powered by blists - more mailing lists