mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
src/common/util.c:expand_filename() - Perhaps use GetFullPathName() as a form of input validation on the filename argument.
This commit is contained in:
parent
b3639c8291
commit
4e19133dcc
@ -2873,6 +2873,9 @@ expand_filename(const char *filename)
|
||||
{
|
||||
tor_assert(filename);
|
||||
#ifdef _WIN32
|
||||
/* Might consider using GetFullPathName() as described here:
|
||||
* http://etutorials.org/Programming/secure+programming/Chapter+3.+Input+Validation/3.7+Validating+Filenames+and+Paths/
|
||||
*/
|
||||
return tor_strdup(filename);
|
||||
#else
|
||||
if (*filename == '~') {
|
||||
|
Loading…
Reference in New Issue
Block a user