linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Remove a magic number
@ 2011-06-01 15:28 Waldemar Rymarkiewicz
  2011-06-01 15:28 ` [PATCH 2/2] Bluetooth: Verify a pin code in pin_code_reply Waldemar Rymarkiewicz
  2011-06-01 19:56 ` [PATCH 1/2] Bluetooth: Remove a magic number Gustavo F. Padovan
  0 siblings, 2 replies; 5+ messages in thread
From: Waldemar Rymarkiewicz @ 2011-06-01 15:28 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: padovan, Johan Hedberg, Waldemar Rymarkiewicz

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
---
 net/bluetooth/mgmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index fe835b8..78d1a5f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1143,7 +1143,7 @@ static int pin_code_reply(struct sock *sk, u16 index, unsigned char *data,
 
 	bacpy(&reply.bdaddr, &cp->bdaddr);
 	reply.pin_len = cp->pin_len;
-	memcpy(reply.pin_code, cp->pin_code, 16);
+	memcpy(reply.pin_code, cp->pin_code, sizeof(reply.pin_code));
 
 	err = hci_send_cmd(hdev, HCI_OP_PIN_CODE_REPLY, sizeof(reply), &reply);
 	if (err < 0)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-02  8:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 15:28 [PATCH 1/2] Bluetooth: Remove a magic number Waldemar Rymarkiewicz
2011-06-01 15:28 ` [PATCH 2/2] Bluetooth: Verify a pin code in pin_code_reply Waldemar Rymarkiewicz
2011-06-01 20:51   ` Gustavo F. Padovan
2011-06-02  8:27     ` Waldemar.Rymarkiewicz
2011-06-01 19:56 ` [PATCH 1/2] Bluetooth: Remove a magic number Gustavo F. Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).