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
NULL file not found !=NULL mem.xmalloc'd file name
See Implementation
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