File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ char szSymbolCachePath[MAX_PATH] = "";
53
53
char sqlitedb[deflen] = " " ;
54
54
PROCESS_INFORMATION* fdProcessInfo = &g_pi;
55
55
HANDLE hActiveThread;
56
+ HANDLE hProcessToken;
56
57
bool bUndecorateSymbolNames = true ;
57
58
bool bEnableSourceDebugging = true ;
58
59
@@ -1860,6 +1861,9 @@ static void debugLoopFunction(void* lpParameter, bool attach)
1860
1861
// set script variables
1861
1862
varset (" $hp" , (duint)fdProcessInfo->hProcess , true );
1862
1863
varset (" $pid" , fdProcessInfo->dwProcessId , true );
1864
+
1865
+ if (!OpenProcessToken (fdProcessInfo->hProcess , TOKEN_ALL_ACCESS, &hProcessToken))
1866
+ hProcessToken = 0 ;
1863
1867
}
1864
1868
1865
1869
// set custom handlers
@@ -1933,6 +1937,8 @@ static void debugLoopFunction(void* lpParameter, bool attach)
1933
1937
dputs (" Debugging stopped!" );
1934
1938
varset (" $hp" , (duint)0 , true );
1935
1939
varset (" $pid" , (duint)0 , true );
1940
+ if (hProcessToken)
1941
+ CloseHandle (hProcessToken);
1936
1942
unlock (WAITID_STOP); // we are done
1937
1943
pDebuggedEntry = 0 ;
1938
1944
pDebuggedBase = 0 ;
You can’t perform that action at this time.
0 commit comments