Message ID | 20230224-btbcm-wtf-v1-1-98b56133a5b7@gmail.com |
---|---|
State | New |
Headers | show |
Series | [RESEND] bluetooth: btbcm: Fix logic error in forming the board name. | expand |
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Fri, 10 Mar 2023 11:28:42 +0100 you wrote: > From: Sasha Finkelstein <fnkl.kernel@gmail.com> > > This patch fixes an incorrect loop exit condition in code that replaces > '/' symbols in the board name. There might also be a memory corruption > issue here, but it is unlikely to be a real problem. > > Cc: <stable@vger.kernel.org> > Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com> > > [...] Here is the summary with links: - [RESEND] bluetooth: btbcm: Fix logic error in forming the board name. https://git.kernel.org/bluetooth/bluetooth-next/c/3629e1ce7721 You are awesome, thank you!
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 3006e2a0f37e..43e98a598bd9 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -511,7 +511,7 @@ static const char *btbcm_get_board_name(struct device *dev) len = strlen(tmp) + 1; board_type = devm_kzalloc(dev, len, GFP_KERNEL); strscpy(board_type, tmp, len); - for (i = 0; i < board_type[i]; i++) { + for (i = 0; i < len; i++) { if (board_type[i] == '/') board_type[i] = '-'; }