Jiaxun Yang 830181ddce 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:13:07 +02:00
..
2023-03-17 08:31:43 +01:00
2019-02-27 10:08:53 +01:00
2019-07-28 08:29:28 +02:00
2021-11-26 11:36:20 +01:00
2021-08-12 13:19:40 +02:00