Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de2d1a7e authored by tangchen's avatar tangchen Committed by Rafael J. Wysocki
Browse files

ACPI / tables: Check if id is NULL in acpi_table_parse()



strncmp() does not check if the params are NULL. In acpi_table_parse(),
if @id is NULL, the kernel will panic.

Signed-off-by: default avatarTang Chen <tangchen@cn.fujitsu.com>
Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 6a368751
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler)
	if (acpi_disabled)
		return -ENODEV;

	if (!handler)
	if (!id || !handler)
		return -EINVAL;

	if (strncmp(id, ACPI_SIG_MADT, 4) == 0)