diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-08-10 17:05:55 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-08-10 20:35:21 +0200 |
commit | c1e704626a162316f77ddc6e734ae63f4fb6bb88 (patch) | |
tree | 1aae7ea2a3adcccbaacca65dea52bdb308fe2699 /src/ukify/ukify.py | |
parent | Merge pull request #28767 from poettering/epoll-eperm-journalctl (diff) | |
download | systemd-c1e704626a162316f77ddc6e734ae63f4fb6bb88.tar.xz systemd-c1e704626a162316f77ddc6e734ae63f4fb6bb88.zip |
ukify: Use length= instead of ignore_padding= in inspect
ignore_padding= was only added in a recent version of pefile. Let's
set length= to the virtual size instead which is what ignore_padding
does behind the scenes so we're compatible with older versions of
pefile.
Diffstat (limited to 'src/ukify/ukify.py')
-rwxr-xr-x | src/ukify/ukify.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index 0ddf56ae5e..10a464bb1a 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -958,8 +958,9 @@ def inspect_section(opts, section): ttype = config.output_mode if config else DEFAULT_SECTIONS_TO_SHOW.get(name, 'binary') - data = section.get_data(ignore_padding=True) size = section.Misc_VirtualSize + # TODO: Use ignore_padding once we can depend on a newer version of pefile + data = section.get_data(length=size) digest = sha256(data).hexdigest() struct = { |