Merge fb4d571495fa from the 1.7 branch to trunk.
This commit is contained in:
@@ -18,9 +18,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <compat.h>
|
#include <compat.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reverse memchr()
|
* Reverse memchr()
|
||||||
* Find the last occurrence of 'c' in the buffer 's' of size 'n'.
|
* Find the last occurrence of 'c' in the buffer 's' of size 'n'.
|
||||||
|
@@ -122,7 +122,10 @@ find_path(infile, outfile, sbp, path)
|
|||||||
* Check current dir if dot was in the PATH
|
* Check current dir if dot was in the PATH
|
||||||
*/
|
*/
|
||||||
if (!result && checkdot) {
|
if (!result && checkdot) {
|
||||||
result = sudo_goodpath(infile, sbp);
|
len = snprintf(command, sizeof(command), "./%s", infile);
|
||||||
|
if (len <= 0 || len >= sizeof(command))
|
||||||
|
errorx(1, "%s: File name too long", infile);
|
||||||
|
result = sudo_goodpath(command, sbp);
|
||||||
if (result && def_ignore_dot)
|
if (result && def_ignore_dot)
|
||||||
return(NOT_FOUND_DOT);
|
return(NOT_FOUND_DOT);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user