On Wed, Jun 18, 2025 at 07:24:23PM +0000, Lidong Chen wrote:
> In bidi_line_wrap(), "kk - 1" in the for loop init, "i = kk - 1",
> underflows when 'kk' (unsigned int) is 0. Assigning the result of
> 'kk - 1' to signed int 'i' may cause overflow. To address both
> issues, cast 'kk' to a signed type before subtraction to ensure
> safe arithmetic and assignment.
>
> Fixed: CID 473874
>
> Signed-off-by: Lidong Chen <lidong.c...@oracle.com>

Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com>

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to