mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
fixed off by one error with MAXPATHLEN and fixed a comment
This commit is contained in:
@@ -172,7 +172,7 @@ static char * realpath_exec(path, file, command)
|
||||
char * file;
|
||||
char * command;
|
||||
{
|
||||
char fn[MAXPATHLEN]; /* filename (path + file) */
|
||||
char fn[MAXPATHLEN+1]; /* filename (path + file) */
|
||||
struct stat statbuf; /* for stat(2) */
|
||||
|
||||
(void) sprintf(fn, "%s/%s", path, file);
|
||||
@@ -185,7 +185,7 @@ static char * realpath_exec(path, file, command)
|
||||
return(command);
|
||||
} else if (errno && errno != ENOENT && errno != ENOTDIR && errno != EINVAL
|
||||
&& errno != EPERM && errno != EACCES) {
|
||||
/* realpath() got an error */
|
||||
/* sudo_realpath() got an error */
|
||||
fprintf(stderr, "sudo: Error resolving %s: ", fn);
|
||||
perror("");
|
||||
}
|
||||
|
Reference in New Issue
Block a user