mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Do not consider using -C arg "as is" for .CURDIR unless it starts with /.
Reported by: bdrewery
This commit is contained in:
parent
277681e109
commit
a3b2e0bc8b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315088
|
@ -458,7 +458,8 @@ MainParseArgs(int argc, char **argv)
|
|||
(void)fprintf(stderr, "%s: %s.\n", progname, strerror(errno));
|
||||
exit(2);
|
||||
}
|
||||
if (stat(argvalue, &sa) != -1 &&
|
||||
if (argvalue[0] == '/' &&
|
||||
stat(argvalue, &sa) != -1 &&
|
||||
stat(curdir, &sb) != -1 &&
|
||||
sa.st_ino == sb.st_ino &&
|
||||
sa.st_dev == sb.st_dev)
|
||||
|
|
Loading…
Reference in a new issue