lib: fix hci_strtolm crash
authorYun-Hao Chung <howardchung@chromium.org>
Mon, 14 Feb 2022 09:13:43 +0000 (17:13 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:53 +0000 (14:55 +0530)
commit0823adc49ca4f17af369f60b96e3fa2ec07377d6
tree3e2cffb592ff1463edc0125d2a32376e2001e2a8
parent46d8ad300b3efa9df412446dd10aeebfe6e334a5
lib: fix hci_strtolm crash

|str| can be NULL in the case of reading lm value. Calling strcasestr
could lead to a crash.

Reviewed-by: Archie Pusaka <apusaka@chromium.org>
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
lib/hci.c