Skip to content

Commit

Permalink
Remove unnecessary assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Jan 2, 2025
1 parent 4b3b1e2 commit 2b19a41
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,15 +1003,12 @@ def sizeof(self):
return self.__format_length__

def __unpack__(self, data):
data = data

if len(data) > self.__format_length__:
data = data[: self.__format_length__]

# Some malware have incorrect header lengths.
# Fail gracefully if this occurs
# Buggy malware: a29b0118af8b7408444df81701ad5a7f
#
elif len(data) < self.__format_length__:
raise PEFormatError("Data length less than expected header length.")

Expand Down

0 comments on commit 2b19a41

Please sign in to comment.