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

2024-03-29 Thread Maks Mishin
Return value of a function 'gelf_getehdr' is dereferenced without checking for NULL, but it is usually checked for this function. Found by RASU JSC. 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 0e9311

[PATCH] readelf: Fix division by zero in handle a relocation sections

2024-03-29 Thread Maks Mishin
Variable 'sh_entsize', whose possible value set allows a zero value by calling function 'gelf_fsize', is used as a denominator in calculation of 'nentries' variable. Found by RASU JSC. Signed-off-by: Maks Mishin --- src/readelf.c | 18 ++ 1 file changed, 18 insertions(+) diff -

Re: [PATCH v3 1/6] Support Mips architecture

2024-03-29 Thread Ying Huang
Hi Mark, Next time I send a patch, I will add ChangeLog entry in commit message and check the added file. Thanks, Ying 在 2024/3/29 08:18, Mark Wielaard 写道: > Hi Ying, > > On Tue, Mar 05, 2024 at 05:51:17PM +0800, Ying Huang wrote: >> From: Ying Huang >> >> Signed-off-by: Ying Huang >> --- >