Skip to content

Commit c2fd63b

Browse files
committed
lief: 0.15.1 -> 0.16.1
Now, enums are actual Python enums, raising `ValueError` for out-of bounds access instead of `RuntimeError`
1 parent 5db41aa commit c2fd63b

File tree

3 files changed

+47
-53
lines changed

3 files changed

+47
-53
lines changed

poetry.lock

+44-50
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ python-magic = "^0.4.27"
2323
pyperscan = "^0.3.0"
2424
lark = "^1.1.8"
2525
lz4 = "^4.3.2"
26-
lief = "^0.15.1"
26+
lief = "^0.16.1"
2727
cryptography = ">=41.0"
2828
treelib = "^1.7.0"
2929
unblob-native = "^0.1.5"

unblob/handlers/executable/elf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def is_valid_header(self, header) -> bool:
143143
lief.ELF.Header.FILE_TYPE(header.e_type)
144144
lief.ELF.ARCH(header.e_machine)
145145
lief.ELF.Header.VERSION(header.e_version)
146-
except RuntimeError:
146+
except ValueError:
147147
return False
148148
return True
149149

@@ -170,7 +170,7 @@ def get_last_section_end(
170170
== lief.ELF.Section.TYPE.NOBITS
171171
):
172172
continue
173-
except RuntimeError:
173+
except ValueError:
174174
continue
175175

176176
section_end = section_header.sh_offset + section_header.sh_size

0 commit comments

Comments
 (0)