Jiaxun Yang a6b54af407 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-11 23:03:01 +09:00
..
2023-03-10 09:34:30 +01:00
2022-05-04 22:22:59 +02:00
2023-03-17 08:50:30 +01:00
2022-05-04 22:22:59 +02:00
2022-09-26 12:37:21 -04:00
2022-10-03 09:31:55 -07:00
2022-09-12 15:33:24 +02:00
2022-08-06 16:47:19 -07:00
2021-10-18 18:09:54 +02:00
2022-05-04 22:22:59 +02:00
2022-05-04 22:22:59 +02:00
2022-02-07 18:31:57 +01:00
2022-07-14 11:52:29 +02:00
2022-10-02 18:06:03 +09:00