linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] android/ipc: Zero initialize cmsg buffer
@ 2013-11-21 14:23 Andrei Emeltchenko
  2013-11-21 14:23 ` [PATCH 2/2] android/haltest: " Andrei Emeltchenko
  2013-11-21 14:44 ` [PATCH 1/2] android/ipc: " Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2013-11-21 14:23 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

This fixes valgrind warnings:
...
Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
...
---
 android/ipc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/android/ipc.c b/android/ipc.c
index 2fa90bd..4044d4d 100644
--- a/android/ipc.c
+++ b/android/ipc.c
@@ -47,6 +47,7 @@ void ipc_send(int sk, uint8_t service_id, uint8_t opcode, uint16_t len,
 
 	memset(&msg, 0, sizeof(msg));
 	memset(&m, 0, sizeof(m));
+	memset(cmsgbuf, 0, sizeof(cmsgbuf));
 
 	m.service_id = service_id;
 	m.opcode = opcode;
-- 
1.8.3.2


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

end of thread, other threads:[~2013-11-21 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 14:23 [PATCH 1/2] android/ipc: Zero initialize cmsg buffer Andrei Emeltchenko
2013-11-21 14:23 ` [PATCH 2/2] android/haltest: " Andrei Emeltchenko
2013-11-21 14:44 ` [PATCH 1/2] android/ipc: " Johan Hedberg

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).