mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08:00
change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3 Signed-off-by: lilei19 <lilei19@xiaomi.com>
This commit is contained in:
@@ -983,7 +983,8 @@ int main(int argc, FAR char *argv[])
|
||||
loop_num = CONFIG_TESTING_FSTEST_NLOOPS;
|
||||
ctx->max_file = CONFIG_TESTING_FSTEST_MAXFILE;
|
||||
ctx->max_open = CONFIG_TESTING_FSTEST_MAXOPEN;
|
||||
strcpy(ctx->mountdir, CONFIG_TESTING_FSTEST_MOUNTPT);
|
||||
strlcpy(ctx->mountdir, CONFIG_TESTING_FSTEST_MOUNTPT,
|
||||
sizeof(ctx->mountdir));
|
||||
|
||||
/* Opt Parse */
|
||||
|
||||
@@ -992,7 +993,7 @@ int main(int argc, FAR char *argv[])
|
||||
switch (option)
|
||||
{
|
||||
case 'm':
|
||||
strcpy(ctx->mountdir, optarg);
|
||||
strlcpy(ctx->mountdir, optarg, sizeof(ctx->mountdir));
|
||||
break;
|
||||
case 'h':
|
||||
show_useage();
|
||||
|
@@ -2479,7 +2479,8 @@ int main(int argc, FAR char *argv[])
|
||||
switch (option)
|
||||
{
|
||||
case 'm':
|
||||
strcpy(ctx->mountdir, optarg);
|
||||
strlcpy(ctx->mountdir, optarg,
|
||||
sizeof(ctx->mountdir));
|
||||
break;
|
||||
case 'h':
|
||||
show_useage();
|
||||
|
Reference in New Issue
Block a user