We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a4041f commit 2df2c6eCopy full SHA for 2df2c6e
fs/btrfs/sysfs.c
@@ -1330,13 +1330,13 @@ MODULE_PARM_DESC(read_policy,
1330
1331
int btrfs_read_policy_to_enum(const char *str, s64 *value_ret)
1332
{
1333
- char param[32] = { 0 };
+ char param[32];
1334
char __maybe_unused *value_str;
1335
1336
if (!str || strlen(str) == 0)
1337
return 0;
1338
1339
- strncpy(param, str, sizeof(param) - 1);
+ strscpy(param, str);
1340
1341
#ifdef CONFIG_BTRFS_EXPERIMENTAL
1342
/* Separate value from input in policy:value format. */
0 commit comments