mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
tcp_wrappers: Sprinkle some bounds-checked string copying
It isn't clear if tcpd.c is even compiled in FreeBSD. Reported by: Coverity CIDs: 1006710, 1006804 Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
6c546e77b6
commit
4f14ba6ca3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316803
|
@ -62,10 +62,10 @@ char **argv;
|
|||
*/
|
||||
|
||||
if (argv[0][0] == '/') {
|
||||
strcpy(path, argv[0]);
|
||||
strlcpy(path, argv[0], sizeof(path));
|
||||
argv[0] = strrchr(argv[0], '/') + 1;
|
||||
} else {
|
||||
sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]);
|
||||
snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue