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
Alban Bedel
484c344985
MIPS: FW: Use kstrtoul() to parse unsigned long from the fw environment
...
Fix some value corruptions with values that can't be represented in a
signed long.
Signed-off-by: Alban Bedel <albeu@free.fr >
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8358/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:45:26 +01:00
Alban Bedel
4a792e56cf
MIPS: FW: Fix parsing u-boot environment
...
When reading u-boot's key=value pairs it should skip the '=' and not
use the next argument.
Signed-off-by: Alban Bedel <albeu@free.fr >
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8357/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:45:25 +01:00
Steven J. Hill
14aecdd419
MIPS: FW: Add environment variable processing.
...
Add parsing of the environment and command line variables passed to
the kernel to the firmware library.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com >
2013-05-08 12:30:09 +02:00