| commit | d40e0808309babcf2c88864aa3acef23f1fd3a70 | [log] [tgz] |
|---|---|---|
| author | Anton Moryakov <ant.v.moryakov@gmail.com> | Thu Feb 13 18:57:42 2025 +0300 |
| committer | Mark Wielaard <mark@klomp.org> | Thu Feb 27 18:24:23 2025 +0100 |
| tree | bdfd15a1904293ad2bd7a5d9bb3a481580a6f721 | |
| parent | 52a747a316042e70a22acb489df9e51bfc6bf2d5 [diff] |
readelf: check elf_getarhdr returns NULL in dump_archive_index
Report of the static analyzer:
DEREF_OF_NULL.RET Pointer, returned from function 'elf_getarhdr' at
readelf.c:13551, may be NULL and is dereferenced at readelf.c:13553.
* src/readelf.c (dump_archive_index): Check elf_getarhdr doesn't
return NULL.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>