On Thu, Nov 20, 2025 at 02:25:50PM +0800, Michael Chang via Grub-devel wrote:
> The grub_strtol() call in blsuki_is_default_entry() can set grub_errno
> to either GRUB_ERR_BAD_NUMBER or GRUB_ERR_OUT_OF_RANGE if the input
> string is invalid or out of range.
>
> This errno value is currently left uncleared, which can lead to
> unexpected behavior in subsequent functions that rely on checking
> current state of grub_errno.
>
> Clear grub_errno unconditionally when grub_strtol() reports error so
> that we can plug the leak.
>
> Signed-off-by: Michael Chang <[email protected]>
> Reviewed-by: Sudhakar Kuppusamy <[email protected]>
> Reviewed-by: Avnish Chouhan <[email protected]>
> Reviewed-by: Alec Brown <[email protected]>

Reviewed-by: Daniel Kiper <[email protected]>

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to