Re: [PATCH] src: fix DEREF_OF_NULL.RET in readelf.c

2025-02-27 Thread Mark Wielaard
Hi Anton, On Thu, 2025-02-13 at 18:57 +0300, Anton Moryakov wrote: > 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. > > Corrections explained: > - Added a NULL check fo

[PATCH] src: fix DEREF_OF_NULL.RET in readelf.c

2025-02-13 Thread Anton Moryakov
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. Corrections explained: - Added a NULL check for the pointer returned by `elf_getarhdr`. - If the pointer is NULL, release resour