17 lines
712 B
Diff
17 lines
712 B
Diff
|
Index: sudo-1.7.2p4/find_path.c
|
||
|
===================================================================
|
||
|
--- sudo-1.7.2p4.orig/find_path.c 2010-05-18 17:40:20.000000000 +0200
|
||
|
+++ sudo-1.7.2p4/find_path.c 2010-05-18 17:46:44.000000000 +0200
|
||
|
@@ -126,7 +126,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);
|
||
|
}
|