shim: attempt to improve the argument handling
shim: attempt to improve the argument handling

  "So, load options are a giant pain in the ass." - Peter Jones

This patch attempts to workaround two LoadOption problems seen on
my test system: arguments separated with only whitespace (L" ") and
strings that aren't properly NULL terminated.

In addition to my test system, it appears at least one other person
has run into a similar problem and I can reproduce the whitespace
delimiter issue with QEMU+OVMF (OEMU v5.2.0, OVMF v202011).

 * https://github.com/rhboot/shim/issues/181

For reference, using QEMU+OVMF and a simple test application,
"test.efi", which does a hexdump of LoadOptions I see the following
when run via the UEFI shell:

 FS0:\> test.efi one two three
 LoadOptions:
 0000: 74 00 65 00 73 00 74 00 2E 00 65 00 66 00 69 00 t.e.s.t...e.f.i.
 0016: 20 00 6F 00 6E 00 65 00 20 00 74 00 77 00 6F 00 ..o.n.e...t.w.o.
 0032: 20 00 74 00 68 00 72 00 65 00 65 00 00 00       ..t.h.r.e.e...

Signed-off-by: Paul Moore <e829af1001ef91b30955dce496a7335093051956@cisco.com>

rhinstaller/shim,rhinstaller/shim,rhinstaller/shim