mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-09 22:45:11 +00:00
change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3 Signed-off-by: lilei19 <lilei19@xiaomi.com>
This commit is contained in:
parent
e86745b9a2
commit
41f60bd669
33 changed files with 238 additions and 180 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue