lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] btrfs: rcu_string: Replace strncpy() with strscpy()
On Sat, Nov 19, 2022 at 11:13:29AM +0300, Artem Chernyshev wrote:
> Using strncpy() on NUL-terminated strings are deprecated.
> To avoid possible forming of non-terminated string
> strscpy() could be used.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 606686eeac45 ("Btrfs: use rcu to protect device->name")
> Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>

Added to misc-next, thanks. There's one last strncpy in
btrfs_ioctl_dev_info if you also want to convert it. The rest is strcpy
from static strings.

\
 
 \ /
  Last update: 2022-11-21 19:55    [W:0.166 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site