Commit 2e87882
fix(elf2image): Handle ELF files with zero program header counts
The program header table can describe zero or more segments. However,
commit ca16d5f introduced checks in _read_segments() that will fail
on a zero number of program header entries.
Simply return early and skip these checks in _read_segments() if
e_phnum is zero.
Signed-off-by: Tormod Volden <[email protected]>1 parent 13121d4 commit 2e87882
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1418 | 1418 | | |
1419 | 1419 | | |
1420 | 1420 | | |
| 1421 | + | |
| 1422 | + | |
1421 | 1423 | | |
1422 | 1424 | | |
1423 | 1425 | | |
| |||
0 commit comments