From: Avnish Chouhan <avnish@linux.ibm.com>
To: mchang@suse.com
Cc: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Subject: Re: [PATCH] blsuki: Fix grub_errno leakage in blsuki_is_default_entry()
Date: Mon, 10 Nov 2025 20:34:18 +0530 [thread overview]
Message-ID: <ba42bd40669ec8fb0d0708aa406fb023@linux.ibm.com> (raw)
In-Reply-To: <mailman.2112.1762781770.1058.grub-devel@gnu.org>
On 2025-11-10 19:06, grub-devel-request@gnu.org wrote:
> Message: 3
> Date: Mon, 10 Nov 2025 15:38:13 +0800
> From: Michael Chang <mchang@suse.com>
> To: The development of GNU GRUB <grub-devel@gnu.org>
> Subject: [PATCH] blsuki: Fix grub_errno leakage in
> blsuki_is_default_entry()
> Message-ID: <20251110073813.20146-1-mchang@suse.com>
>
> The grub_strtol() call in blsuki_is_default_entry() can set grub_errno
> to GRUB_ERR_BAD_NUMBER if the input string cannot be converted into any
> valid digits.
>
> This errno value is currently left uncleared, which can lead to
> unexpected behavior in subsequent logic that tests the result of a
> function by checking grub_errno.
>
> Clear grub_errno and return false when GRUB_ERR_BAD_NUMBER is set, as
> this specific error should be ignored in this context.
>
> Signed-off-by: Michael Chang <mchang@suse.com>
Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>
Regards,
Avnish Chouhan
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next parent reply other threads:[~2025-11-10 15:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2112.1762781770.1058.grub-devel@gnu.org>
2025-11-10 15:04 ` Avnish Chouhan [this message]
2025-11-11 4:37 ` [PATCH] blsuki: Fix grub_errno leakage in blsuki_is_default_entry() Michael Chang via Grub-devel
2025-11-10 7:38 Michael Chang via Grub-devel
2025-11-10 13:35 ` Sudhakar Kuppusamy
2025-11-11 4:38 ` Michael Chang via Grub-devel
2025-11-10 14:55 ` Michael Lawnick via Grub-devel
2025-11-11 4:18 ` Michael Chang via Grub-devel
2025-11-10 17:26 ` Alec Brown via Grub-devel
2025-11-11 4:36 ` Michael Chang via Grub-devel
2025-11-11 4:21 ` Michael Chang via Grub-devel
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=ba42bd40669ec8fb0d0708aa406fb023@linux.ibm.com \
--to=avnish@linux.ibm.com \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=mchang@suse.com \
/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