Commit d27ce37
committed
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 <debian.tormod@gmail.com>1 parent da4346b commit d27ce37
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
| 1437 | + | |
| 1438 | + | |
1437 | 1439 | | |
1438 | 1440 | | |
1439 | 1441 | | |
| |||
0 commit comments