]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-boot: stub: check LoadOptions contains data (#5467)
authorMikko Ylinen <mikko.ylinen@linux.intel.com>
Mon, 27 Feb 2017 19:03:07 +0000 (21:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 27 Feb 2017 19:03:07 +0000 (20:03 +0100)
commit293b167349cd4e9e1980cf9095bbfe0e65bf9a9f
tree7ee3462a862dc4edaa91225b9ab5e5c562fcc99d
parent3c3fff44b2c46818bc240e3237925ad927b2831e
sd-boot: stub: check LoadOptions contains data (#5467)

With some UEFI shells LoadOptionsSize is reported being > 0
but the corresponding LoadOptions does not contain any data
(the first element has value 0).

When that happens, the stub feature that allows .cmdline to be
replaced by what's in LoadOptions ends up copying nothing/random
data to the kernel cmdline resulting in different kinds of boot
problems.

To fix this, add a check to see if LoadOptions contains data
before replacing the .cmdline.

Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
src/boot/efi/stub.c