]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name}
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 24 May 2022 20:02:45 +0000 (13:02 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 22 Jul 2022 00:07:16 +0000 (17:07 -0700)
commit5ca495c0f9c640d6684dcf18f29891700c9b022a
tree6a91198c1299aa40678c1220ed3b339bad7d0585
parent1df917ed82e7fc13d1989bccdbb012b514abd979
Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name}

Both dev_name and short_name are not guaranteed to be NULL terminated so
this instead use strnlen and then attempt to determine if the resulting
string needs to be truncated or not.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216018
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/eir.c
net/bluetooth/mgmt.c