]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name()
authorCharles Han <hanchunchao@inspur.com>
Fri, 27 Dec 2024 09:20:46 +0000 (17:20 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 15 Jan 2025 15:34:27 +0000 (10:34 -0500)
commitb88655bc6593c6a7fdc1248b212d17e581c4334e
treef351d1df46b820265855befc1ecb571965cf254f
parent30209aeff75fe18cf01a63332a7a7f472877d445
Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name()

devm_kstrdup() can return a NULL pointer on failure,but this
returned value in btbcm_get_board_name() is not checked.
Add NULL check in btbcm_get_board_name(), to handle kernel NULL
pointer dereference error.

Fixes: f9183eaad915 ("Bluetooth: btbcm: Use devm_kstrdup()")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btbcm.c