Merge fb4d571495fa from the 1.7 branch to trunk.

This commit is contained in:
Todd C. Miller
2010-04-09 06:18:43 -04:00
2 changed files with 4 additions and 4 deletions

View File

@@ -122,7 +122,10 @@ find_path(infile, outfile, sbp, path)
* Check current dir if dot was in the PATH
*/
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)
return(NOT_FOUND_DOT);
}