testuser2 / hadesmem

Automatically exported from code.google.com/p/hadesmem
0 stars 0 forks source link

error opening any process not equal to self #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open anyprocess not self.
2.
3.

What is the expected output? What do you see instead?
openprocess(0)

What version of the product are you using? On what operating system?

svn

Please provide any additional information below.

      // Constructor
      explicit Impl(DWORD ProcID) 
        : m_Handle(), 
        m_ID(0), 
        m_IsWoW64(false)
      {
        // Open process
        if (GetCurrentProcessId() == ProcID)
        {
          m_Handle.reset(new EnsureCloseHandle(GetCurrentProcess()));
          m_ID = GetCurrentProcessId();
        }
        else
        {
          Open(m_ID);
        }

if not GetCurrentProcessId == ProcID then m_ID is NULL

Original issue reported on code.google.com by Alessan...@gmail.com on 24 Jul 2011 at 4:27

GoogleCodeExporter commented 9 years ago
Thanks, fixed in SVN, will be in next release. Really need to find a way to 
unit test this case... It slipped through because all my unit tests operate on 
GetCurrentProcess to avoid failures for security reasons.

Original comment by raptorfactor@raptorfactor.com on 27 Jul 2011 at 6:11