Commit Bot
2018-11-06 06:14:14 UTC
From: Waldemar Kozaczuk <***@gmail.com>
Committer: Waldemar Kozaczuk <***@gmail.com>
Branch: master
Fixed compiler warning in misc-fsx.c
Fixed compiler warning: ‘strncpy’ specified bound 1024 equals destination
size [-Wstringop-truncation]
Signed-off-by: Waldemar Kozaczuk <***@gmail.com>
---
diff --git a/tests/misc-fsx.c b/tests/misc-fsx.c
--- a/tests/misc-fsx.c
+++ b/tests/misc-fsx.c
@@ -1467,9 +1467,9 @@ main(int argc, char **argv)
randomoplen = 0;
break;
case 'P':
- strncpy(goodfile, optarg, sizeof(goodfile));
+ strncpy(goodfile, optarg, sizeof(goodfile) - 1);
strcat(goodfile, "/");
- strncpy(logfile, optarg, sizeof(logfile));
+ strncpy(logfile, optarg, sizeof(logfile) - 1);
strcat(logfile, "/");
break;
case 'R':
Committer: Waldemar Kozaczuk <***@gmail.com>
Branch: master
Fixed compiler warning in misc-fsx.c
Fixed compiler warning: ‘strncpy’ specified bound 1024 equals destination
size [-Wstringop-truncation]
Signed-off-by: Waldemar Kozaczuk <***@gmail.com>
---
diff --git a/tests/misc-fsx.c b/tests/misc-fsx.c
--- a/tests/misc-fsx.c
+++ b/tests/misc-fsx.c
@@ -1467,9 +1467,9 @@ main(int argc, char **argv)
randomoplen = 0;
break;
case 'P':
- strncpy(goodfile, optarg, sizeof(goodfile));
+ strncpy(goodfile, optarg, sizeof(goodfile) - 1);
strcat(goodfile, "/");
- strncpy(logfile, optarg, sizeof(logfile));
+ strncpy(logfile, optarg, sizeof(logfile) - 1);
strcat(logfile, "/");
break;
case 'R':
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.