fix invalid memory access

This commit is contained in:
Arvid Norberg 2015-01-27 01:09:16 +00:00
parent 678d4f3a82
commit fe10128d53
1 changed files with 2 additions and 1 deletions

View File

@ -466,7 +466,8 @@ namespace libtorrent
}
if (filename_len > path.length()
|| path.compare(path.size() - filename_len, filename_len, filename) != 0)
|| path.compare(path.size() - filename_len, filename_len, filename
, filename_len) != 0)
{
// if the filename was sanitized and differ, clear it to just use path
filename = NULL;