From: Quentin Schulz <quentin.schulz@cherry.de>
To: ant.v.moryakov@gmail.com, u-boot@lists.denx.de
Cc: Maks Mishin <maks.mishinFZ@gmail.com>
Subject: Re: [PATCH] scripts: Fix potential null-deref
Date: Fri, 18 Apr 2025 15:51:42 +0200 [thread overview]
Message-ID: <ebd844d2-fa08-4e5c-b5c1-554d1e86ea27@cherry.de> (raw)
In-Reply-To: <20250418081958.12818-1-ant.v.moryakov@gmail.com>
Hi Maks(?)
On 4/18/25 10:19 AM, ant.v.moryakov@gmail.com wrote:
> From: Maks Mishin <maks.mishinFZ@gmail.com>
>
> Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
This seems to differ from the sender. Are you Maks? If not, you need to
add your Signed-off-by to fulfill the DCO requirements.
> ---
> scripts/kconfig/menu.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 5c5c1374..a0d0d2af 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -812,8 +812,10 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym,
> }
> }
> }
> - for_all_prompts(sym, prop)
> - get_prompt_str(r, prop, head);
> + if (sym) {
> + for_all_prompts(sym, prop)
> + get_prompt_str(r, prop, head);
> + }
>
> prop = get_symbol_prop(sym);
This one too can do a null-deref.
And same for some other functions after as well.
Wondering if we shouldn't update the macros to not enter the for loops
if sym is NULL? So we don't have to patch every caller?
Cheers,
Quentin
next prev parent reply other threads:[~2025-04-18 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 8:19 [PATCH] scripts: Fix potential null-deref ant.v.moryakov
2025-04-18 8:19 ` [PATCH] tools: Fix memory and descriptor leak ant.v.moryakov
2025-04-18 13:51 ` Quentin Schulz
2025-04-18 8:19 ` [PATCH] tools: Fix potential memory leak in aisimage.c ant.v.moryakov
2025-04-18 13:52 ` Quentin Schulz
2025-04-18 8:19 ` [PATCH] tools: image-host: Fix potential memory leak ant.v.moryakov
2025-04-18 13:52 ` Quentin Schulz
2025-04-18 13:51 ` Quentin Schulz [this message]
2025-04-18 14:18 ` [PATCH] scripts: Fix potential null-deref Tom Rini
-- strict thread matches above, loose matches on Subject: below --
2025-02-03 16:50 Maks Mishin
2025-02-03 21:48 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebd844d2-fa08-4e5c-b5c1-554d1e86ea27@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=ant.v.moryakov@gmail.com \
--cc=maks.mishinFZ@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox