microsoft / referencesource

Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework
https://referencesource.microsoft.com/
MIT License
3.17k stars 1.27k forks source link

Missing max path length check of destination path when moving file #146

Open fernetowac opened 3 years ago

fernetowac commented 3 years ago

Hi guys, there's double check for sourcePath at Directory.cs's InternalMove method: https://github.com/microsoft/referencesource/blob/5697c29004a34d80acdaf5742d7e699022c64ecd/mscorlib/system/io/directory.cs#L1230-L1241

Looks like the second check on line 1240 was supposed to be done on destPath instead.