Skip to content

Commit

Permalink
Bugfix: Get-PE
Browse files Browse the repository at this point in the history
I was incorrectly calculating the size of the PE file when provided as a
byte array. Copy/paste fail.
  • Loading branch information
Matt Graeber committed Aug 24, 2015
1 parent c8ab0f4 commit fa095cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parsers/Get-PE.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ Known issues:
$ImageType = 'File'
$ProcessID = $PID

$PELen = $FileByteArray.Length
$PELen = $FileBytes.Length
# Pin the byte array in memory (i.e. do not garbage collect)
# so you can reliably dereference it.
$Handle = [Runtime.InteropServices.GCHandle]::Alloc($FileBytes, 'Pinned')
Expand Down

0 comments on commit fa095cd

Please sign in to comment.