On 07.12.2013 09:44, Andrey Borzenkov wrote: > + install_device[grub_strlen (install_device) - 1] = '\0'; > + install_drive = xstrdup (install_device + 1); > + install_device[grub_strlen (install_device) - 1] = ')'; > + } Bad code. You forgot that grub_strlen changes with your operations. You need to keep explicit pointer.