Re: [PATCH] usb: replace strcpy() with strscpy()
From: Aditya Garg <hidden>
Date: 2025-02-28 17:09:46
Also in:
linux-usb, lkml
From: Aditya Garg <hidden>
Date: 2025-02-28 17:09:46
Also in:
linux-usb, lkml
On 28 Feb 2025, at 10:33 PM, gregkh@linuxfoundation.org wrote: On Fri, Feb 28, 2025 at 03:07:03PM +0000, Aditya Garg wrote:quoted
From: Aditya Garg <redacted> The strcpy() function has been deprecated and replaced with strscpy(). This patch shall replace it in the whole USB tree. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Aditya Garg <redacted>As the two functions do different things, are you sure it is safe to just do a search/replace here? If so, you need to explain that in the changelog why this is ok, and if not, please document that as well :)
That's actually a good question. From what I can tell from the kernel docs, the only case where this can be a problem is when strcpy is returning. While I don't see any such case over here, I'll still double check if that's the case. Also, I'll wait for the kernel test bot results.