mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Make sure to catch any exceptions from processing invalid/garbage paths
This commit is contained in:
@@ -271,7 +271,19 @@ namespace renderdocui.Code
|
||||
|
||||
foreach (var n in names)
|
||||
{
|
||||
if(String.Compare(Path.GetFullPath(n), myJSON, StringComparison.CurrentCultureIgnoreCase) == 0)
|
||||
string fullpath;
|
||||
|
||||
try
|
||||
{
|
||||
fullpath = Path.GetFullPath(n);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// invalid path or similar
|
||||
fullpath = "";
|
||||
}
|
||||
|
||||
if(String.Compare(fullpath, myJSON, StringComparison.CurrentCultureIgnoreCase) == 0)
|
||||
{
|
||||
thisRegistered = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user