Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8da01af4 authored by Kees Cook's avatar Kees Cook Committed by Linus Torvalds
Browse files

Documentation/accounting/getdelays.c: avoid strncpy in accounting tool



Avoid strncpy anti-pattern.

[akpm@linux-foundation.org: remove the str[cpy|dup] altogether]
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 94ac1183
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ int main(int argc, char *argv[])
	char *logfile = NULL;
	int loop = 0;
	int containerset = 0;
	char containerpath[1024];
	char *containerpath = NULL;
	int cfd = 0;
	int forking = 0;
	sigset_t sigset;
@@ -299,7 +299,7 @@ int main(int argc, char *argv[])
			break;
		case 'C':
			containerset = 1;
			strncpy(containerpath, optarg, strlen(optarg) + 1);
			containerpath = optarg;
			break;
		case 'w':
			logfile = strdup(optarg);