[PATCH] libdwfl: fix DEREF_OF_NULL.EX in dwfl_segment_report_module.c

2025-01-31 Thread Anton Moryakov
Report of the static analyzer: After having been assigned to a NULL value at dwfl_segment_report_module.c:187, pointer 'retval' is dereferenced at dwfl_segment_report_module.c:195 by calling function 'strcmp'. (CWE476) Corrections explained: When processing file notes, the code could dereference a

[PATCH] libelf: fix DEREF_OF_NULL.RET in objdump.c

2025-01-31 Thread Anton Moryakov
Report of the static analyzer: Pointer, returned from function 'elf_getarhdr' at objdump.c:314, may be NULL and is dereferenced at objdump.c:317. (CWE476, CWE690) Corrections explained: When processing archive elements, the code could dereference a NULL pointer if 'elf_getarhdr' returns NULL. This

[PATCH] src: fix DEREF_AFTER_NULL.EX in elflint.c

2025-01-31 Thread Anton Moryakov
Report of the static analyzer: After having been compared to a NULL value at elflint.c:252, pointer 'suffix' is dereferenced at elflint.c:260 by calling function 'stpcpy' Corrections explained: When processing a file with a NULL suffix, the code could dereference a NULL pointer, leading to undefin

[PATCH] libdw: fix DEREF_AFTER_NULL.EX in dwarf_ranges.c

2025-01-31 Thread Anton Moryakov
Report of the static analyzer: After having been compared to a NULL value at dwarf_ranges.c:492, pointer 'd' is dereferenced at dwarf_ranges.c:531. (CWE476) Corrections explained: When processing a DIE with missing or invalid section data, the code could dereference a NULL pointer, leading to unde