lkml.org 
[lkml]   [2023]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] staging: rtl8192e: prefer strscpy over strncpy
From
On 8/9/23 14:21, Greg KH wrote:
> On Sat, Aug 05, 2023 at 09:51:14AM +0200, Michael Straube wrote:
>> Replace strncpy with strscpy in two places where the destination buffer
>> should be NUL-terminated. Found by checkpatch.
>>
>> WARNING: Prefer strscpy, strscpy_pad, or __nonstring over strncpy - see: https://github.com/KSPP/linux/issues/90
>
> If a global search/replace could be done, it would have happend a long
> time ago.
>
> How was this tested? The functions work differently, are you sure there
> is no change in functionality here?
>

It was only compile tested. To me it looked as it does not change
functionality, but looking a bit deeper at it I'm not sure anymore.
So, we should leave it as is.

thank you
Michael

\
 
 \ /
  Last update: 2023-08-09 20:04    [W:0.040 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site