Skip to content

Commit

Permalink
fix(proc): Spurious condition when querying process protection attrib…
Browse files Browse the repository at this point in the history
…utes
  • Loading branch information
rabbitstack committed Oct 11, 2024
1 parent 06c0f66 commit aaa5c09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ps/snapshotter_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func (s *snapshotter) Find(pid uint32) (bool, *pstypes.PS) {
if err := windows.IsWow64Process(process, &isWOW64); err != nil && isWOW64 {
proc.IsWOW64 = true
}
if p, err := sys.QueryInformationProcess[sys.PsProtection](process, sys.ProcessProtectionInformation); err != nil && p != nil {
if p, err := sys.QueryInformationProcess[sys.PsProtection](process, sys.ProcessProtectionInformation); err == nil && p != nil {
proc.IsProtected = p.IsProtected()
}
proc.IsPackaged = sys.IsProcessPackaged(process)
Expand Down

0 comments on commit aaa5c09

Please sign in to comment.