]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drivers/bluetooth: btbcm: Use kmalloc_array() to prevent overflow
authorAyaan Mirza Baig <ayaanmirzabaig85@gmail.com>
Tue, 11 Nov 2025 14:20:41 +0000 (19:50 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 1 Dec 2025 21:21:16 +0000 (16:21 -0500)
commit6f7cf13ef6b0fe2bdd539e5aa1b1fc8a1213cfc3
treef01e14a1c53aa123fa134beb40cf0e22c8bc7e6c
parentbc6f557b3387d807e08ffb8d638f149fedb75bf6
drivers/bluetooth: btbcm: Use kmalloc_array() to prevent overflow

Replace the open-coded multiplication in kmalloc() with a call
to kmalloc_array() to prevent potential integer overflows.

This is a mechanical change, replacing BCM_FW_NAME_LEN with
the type-safe sizeof(*fw_name) as the element size

Signed-off-by: Ayaan Mirza Baig <ayaanmirzabaig85@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btbcm.c