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

2025-02-27 Thread Mark Wielaard
Hi Anton, On Thu, Feb 13, 2025 at 07:52:00PM +0300, Anton Moryakov wrote: > Static analyzer reported: > Return value of a function 'gelf_getehdr' is dereferenced at readelf.c:12443 > without checking for NULL, but it is usually checked for this function > (53/54). I can see how a static analyzer

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

2025-02-27 Thread Mark Wielaard
Hi Anton, On Thu, Feb 13, 2025 at 07:33:12PM +0300, Anton Moryakov wrote: > Static analyzer reported: > Return value of a function 'elf_strptr' is dereferenced at readelf.c:7171 > without checking for NULL, but it is usually checked for this function > (71/74). > > Corrections explained: > - Add

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

2025-02-13 Thread Anton Moryakov
Static analyzer reported: Return value of a function 'gelf_getehdr' is dereferenced at readelf.c:12443 without checking for NULL, but it is usually checked for this function (53/54). Corrections explained: - Added a NULL check for the ehdr variable Triggers found by static analyzer Svace. Signed

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

2025-02-13 Thread Anton Moryakov
Static analyzer reported: Return value of a function 'elf_strptr' is dereferenced at readelf.c:7171 without checking for NULL, but it is usually checked for this function (71/74). Corrections explained: - Added a NULL check for the scnname variable, which contains the result of the elf_strptr ca