mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix length check in PSSnapinQualifiedName.GetInstance() (#8837)
This commit is contained in:
@@ -68,7 +68,7 @@ namespace System.Management.Automation
|
||||
return null;
|
||||
PSSnapinQualifiedName result = null;
|
||||
string[] splitName = name.Split(Utils.Separators.Backslash);
|
||||
if (splitName.Length < 0 || splitName.Length > 2)
|
||||
if (splitName.Length == 0 || splitName.Length > 2)
|
||||
return null;
|
||||
result = new PSSnapinQualifiedName(splitName);
|
||||
// If the shortname is empty, then return null...
|
||||
|
||||
Reference in New Issue
Block a user