From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
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 <[email protected]>
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.