mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
coverity: a couple of potential buffer overruns
This commit is contained in:
parent
d3a49926ad
commit
50f6533612
@ -83,7 +83,7 @@ static const char *find_client(const char *clientname)
|
||||
|
||||
while (path) {
|
||||
if ((colon = strchr(path, ':')) == NULL) {
|
||||
strcpy(fullname, path);
|
||||
strlcpy(fullname, path, PATH_MAX);
|
||||
path = NULL;
|
||||
} else {
|
||||
memcpy(fullname, path, colon - path);
|
||||
@ -91,8 +91,8 @@ static const char *find_client(const char *clientname)
|
||||
path = colon + 1;
|
||||
}
|
||||
|
||||
strcat(fullname, "/");
|
||||
strcat(fullname, clientname);
|
||||
strlcat(fullname, "/", PATH_MAX);
|
||||
strlcat(fullname, clientname, PATH_MAX);
|
||||
|
||||
if (access(fullname, R_OK|X_OK) == 0) {
|
||||
return fullname;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user