mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
Avoid strncpy anti-pattern. [[email protected]: remove the str[cpy|dup] altogether] Signed-off-by: Kees Cook <[email protected]> Cc: Andreas Schwab <[email protected]> Cc: Rob Landley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
94ac11833f
commit
8da01af45e
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue