]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: replace deprecated strncpy() with strscpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 25 Feb 2025 19:26:14 +0000 (20:26 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 26 Feb 2025 08:24:01 +0000 (09:24 +0100)
commit2df2c6ed89600a02e1c7a581a6a55e53c38ce0f5
tree35f43234c438d36c1b893e03e4fec88a7bf5b36b
parent5a4041f2c47247575a6c2e53ce14f7b0ac946c33
btrfs: replace deprecated strncpy() with strscpy()

strncpy() is deprecated for NUL-terminated destination buffers. Use
strscpy() instead and don't zero-initialize the param array.

Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c