Skip to content

Commit

Permalink
Add null check before calling Path.GetFullPath (#76696)
Browse files Browse the repository at this point in the history
  • Loading branch information
wscho77 committed Oct 25, 2022
1 parent a394aea commit 5108757
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,14 @@ public static unsafe PEReader OpenPEFile(string filePath, out MemoryMappedViewAc

private EcmaModule AddModule(string filePath, string expectedSimpleName, bool useForBinding, ModuleData oldModuleData = null, bool throwOnFailureToLoad = true)
{
filePath = Path.GetFullPath(filePath);

PEReader peReader = null;
MemoryMappedViewAccessor mappedViewAccessor = null;
PdbSymbolReader pdbReader = null;
try
{
if (oldModuleData == null)
{
filePath = Path.GetFullPath(filePath);
peReader = OpenPEFile(filePath, out mappedViewAccessor);

#if !READYTORUN
Expand Down

0 comments on commit 5108757

Please sign in to comment.