FileName.safeSearchPath

Search Path for file in a safe manner.

Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') attacks. http://cwe.mitre.org/data/definitions/22.html

More info: https://www.securecoding.cert.org/confluence/display/c/FIO02-C.+Canonicalize+path+names+originating+from+tainted+sources

struct FileName
nothrow extern (C++) static
const(char)*
safeSearchPath
(
Strings* path
,
const(char)* name
)

Return Value

Type: const(char)*

NULL file not found !=NULL mem.xmalloc'd file name

Meta