If a simple string for arguments are passed it should be NUL terminated.
This is true for other code but not for "linux" command.
Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
len = grub_utf8_to_utf16 (loaded_image->load_options, len,
(grub_uint8_t *) args, args_len, NULL);
+ /* NUL terminate. */
+ ((grub_efi_char16_t *) loaded_image->load_options)[len++] = 0;
loaded_image->load_options_size = len * sizeof (grub_efi_char16_t);
grub_dprintf ("linux", "starting image %p\n", image_handle);