android_kernel_asus_sm8350/arch/mips/fw
Jiaxun Yang 0f91290774 MIPS: fw: Allow firmware to pass a empty env
commit ee1809ed7bc456a72dc8410b475b73021a3a68d5 upstream.

fw_getenv will use env entry to determine style of env,
however it is legal for firmware to just pass a empty list.

Check if first entry exist before running strchr to avoid
null pointer dereference.

Cc: stable@vger.kernel.org
Link: https://github.com/clbr/n64bootloader/issues/5
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-17 11:35:32 +02:00
..
arc MIPS: fw/arc: Remove unused addr variable 2019-10-04 11:46:22 -07:00
cfe treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
lib MIPS: fw: Allow firmware to pass a empty env 2023-05-17 11:35:32 +02:00
sni MIPS: fw: sni: Fix out of bounds init of o32 stack 2019-10-09 12:47:28 -07:00