On Wed, Jun 25, 2025 at 07:42:24AM +0100, Frediano Ziglio via Grub-devel wrote:
> The size passed to grub_utf8_to_utf16 for the source string is
> used as a limit for the string if NUL character is not encountered
> however len, which is strlen(src)*2+2 is surely greater than
> strlen(src).
> Pass (grub_size_t) -1 to consider only NUL terminator.

We should not blindly assume the NUL is inserted by the loader.
So, still len should be used as a safety net. Or something else
if you think len is wrong...

Daniel

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

Reply via email to