rhboot / shim

UEFI shim loader
Other
856 stars 292 forks source link

Arguments from EFI Shell incorrectly parsed #181

Open howl opened 5 years ago

howl commented 5 years ago

If we have shim in for example /EFI/test/shim.efi, executing cd /EFI/test; shim.efi custom_name.efi; makes shim to take "/EFI/test/shim.efi custom_name.efi" as parameter so it fails to load custom_name.efi as would be expected to do.

In the code is commented that EFI Shell passes this as strings separated with NULL character but in this situation space character is passed instead '20 00'. I think this situation should check for it and remove the own path leaving only "custom_name.efi" as parameter.

It doesn't matter if we specify the preceding / or use the full path /EFI/test/custom_name.efi, the behavior is the same.

pcmoore commented 4 years ago

@howl, can I ask on what system you ran into this problem? I had a similar issue with a set of systems and put together a rough patch that so far has worked for me. I'm planning on posting it here for possible inclusion, but if you are willing to try it out on your system (assuming it is different from my test system) I think that would be helpful.

pcmoore commented 3 years ago

I'm not sure if you are still watching this @howl, but if you are interested I posted a fix for my test system in PR #225.