efi/libstub: Check return value of efi_parse_options
authorArvind Sankar <nivedita@alum.mit.edu>
Thu, 30 Apr 2020 18:28:43 +0000 (14:28 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 1 May 2020 07:40:02 +0000 (09:40 +0200)
commit055042bedd4e0af8186266b189b81e73e708b82b
tree76c9b95853fec86fc172c05bdf3d516fdb3c035a
parent7dde67f2a23ac11962b17128d9a71698430ced95
efi/libstub: Check return value of efi_parse_options

efi_parse_options can fail if it is unable to allocate space for a copy
of the command line. Check the return value to make sure it succeeded.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200430182843.2510180-12-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub.c
drivers/firmware/efi/libstub/x86-stub.c