[COMMITTED] libasm: Check return value of gelf_update_ehdr in asm_end.

2019-03-06 Thread Mark Wielaard
In theory the gelf_update_ehdr call could fail. Immediately report an error in that case. Signed-off-by: Mark Wielaard --- libasm/ChangeLog | 4 libasm/asm_end.c | 6 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 92dfd72..05b8

[COMMITTED] libelf: Fix possible resource leak in elf[32|64]_updatefile.

2019-03-06 Thread Mark Wielaard
When we cannot allocate enough memory to convert the data in updatemmap we should free the scns before returning an error. Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 5 + libelf/elf32_updatefile.c | 1 + 2 files changed, 6 insertions(+) diff --git a/libelf/ChangeLog b/libe