Re: [PATCH] blsuki: Fix grub_errno leakage in blsuki_is_default_entry()

Avnish Chouhan <[email protected]>
Newsgroups org.gnu.grub-devel
Message-ID <[email protected]>
On 2025-11-10 19:06, [email protected] wrote:
> Message: 3
> Date: Mon, 10 Nov 2025 15:38:13 +0800
> From: Michael Chang <[email protected]>
> To: The development of GNU GRUB <[email protected]>
> Subject: [PATCH] blsuki: Fix grub_errno leakage in
> 	blsuki_is_default_entry()
> Message-ID: <[email protected]>
> 
> 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 <[email protected]>

Reviewed-by: Avnish Chouhan <[email protected]>

Regards,
Avnish Chouhan

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.