Skip to content

Commit

Permalink
Fix for REG_QWORD sized Policy value. Thanks to kuza55
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranid committed May 20, 2014
1 parent cf795a1 commit 77cfd10
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OleViewDotNet/COMIELowRightsElevationPolicy.cs
Expand Up @@ -37,7 +37,14 @@ private static string HandleNulTerminate(string s)
private void LoadFromRegistry(SortedDictionary<Guid, COMCLSIDEntry> clsids, SortedDictionary<string, List<COMCLSIDEntry>> servers, RegistryKey key)
{
List<COMCLSIDEntry> clsidList = new List<COMCLSIDEntry>();
Policy = (ElevationPolicy)key.GetValue("Policy", 0);

object policyValue = key.GetValue("Policy", 0);

if (policyValue != null)
{
Policy = (ElevationPolicy)Enum.ToObject(typeof(ElevationPolicy), key.GetValue("Policy", 0));
}

string clsid = (string)key.GetValue("CLSID");

if (clsid != null)
Expand Down

0 comments on commit 77cfd10

Please sign in to comment.