src/common/util.c:expand_filename() - Perhaps use GetFullPathName() as a form of input validation on the filename argument.

This commit is contained in:
Jeremy 2015-12-01 15:41:03 -05:00 committed by Nick Mathewson
parent b3639c8291
commit 4e19133dcc

View File

@ -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 == '~') {