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
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 -
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
>> ---
>