Re: [PATCH] tests, config: Add more .gitignore files

2024-04-01 Thread Mark Wielaard
On Fri, Mar 29, 2024 at 12:43:08AM +0100, Mark Wielaard wrote: > Some new tests and one configure file weren't in .gitignore. Also > we made a copy of libelf.h in tests/ which should be an symlink. > > * config/.gitignore: Add profile.fish. > * tests/.gitignore: Add funcretval_test_str

Re: [PATCH] segment: Fix memory leak in insert()

2024-04-01 Thread Marek Polacek
On Mon, Apr 01, 2024 at 08:25:13PM +0300, Maks Mishin wrote: > Dynamic memory, referenced by 'naddr', is allocated at segment.c:66 > by calling function 'realloc' and lost at segment.c:92. > > Found by RASU JSC. > > Signed-off-by: Maks Mishin > --- > libdwfl/segment.c | 2 ++ > 1 file changed,

[PATCH] segment: Fix memory leak in insert()

2024-04-01 Thread Maks Mishin
Dynamic memory, referenced by 'naddr', is allocated at segment.c:66 by calling function 'realloc' and lost at segment.c:92. Found by RASU JSC. Signed-off-by: Maks Mishin --- libdwfl/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libdwfl/segment.c b/libdwfl/segment.c index f6a3e

[PATCH] readelf: Fix deref-of-null in dump_archive_index()

2024-04-01 Thread Maks Mishin
Pointer, returned from function 'elf_getarhdr' ar readelf.c:13551, may be NULL and is dereferenced at readelf.c:13553. Found by RASU JCS. Signed-off-by: Maks Mishin --- src/readelf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/readelf.c b/src/readelf.c index 0e931184..a650c0b9

[PATCH] readelf: Fix deref-of-null in handle_core_item()

2024-04-01 Thread Maks Mishin
Signed-off-by: Maks Mishin --- src/readelf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/readelf.c b/src/readelf.c index 0e931184..495db13e 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -12440,6 +12440,13 @@ handle_core_item (Elf *core, const Ebl_Core_Item *item, const voi