Re: [PATCH] libelf: Fix possible memory leak in elf_getdata_rawchunk

2023-11-14 Thread Mark Wielaard
Hi, On Wed, 2023-11-08 at 13:59 +0100, Mark Wielaard wrote: > If the rawchunk is not properly aligned we'll create a new buffer > that is correctly aligned and put the data in that new buffer with > memcpy or the conversion function. In such cases the rawchunk leaks > because the new buffer is put

[PATCH] libelf: Fix possible memory leak in elf_getdata_rawchunk

2023-11-08 Thread Mark Wielaard
If the rawchunk is not properly aligned we'll create a new buffer that is correctly aligned and put the data in that new buffer with memcpy or the conversion function. In such cases the rawchunk leaks because the new buffer is put into the Elf_Data_Chunk. * libelf/elf_getdata_rawchunk.c (e