* [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
* [PATCH 2/2] android/haltest: Zero initialize cmsg buffer
2013-11-21 14:23 [PATCH 1/2] android/ipc: Zero initialize cmsg buffer Andrei Emeltchenko
@ 2013-11-21 14:23 ` Andrei Emeltchenko
2013-11-21 14:44 ` [PATCH 1/2] android/ipc: " Johan Hedberg
1 sibling, 0 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>
---
android/client/if-sock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/android/client/if-sock.c b/android/client/if-sock.c
index 2cd06e8..eef9a76 100644
--- a/android/client/if-sock.c
+++ b/android/client/if-sock.c
@@ -130,6 +130,7 @@ static void read_accepted(int fd)
memset(&msg, 0, sizeof(msg));
memset(&iv, 0, sizeof(iv));
+ memset(cmsgbuf, 0, sizeof(cmsgbuf));
iv.iov_base = &cs;
iv.iov_len = sizeof(cs);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] android/ipc: Zero initialize cmsg buffer
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 ` Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-11-21 14:44 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
On Thu, Nov 21, 2013, Andrei Emeltchenko wrote:
> This fixes valgrind warnings:
> ...
> Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s)
> ...
> ---
> android/ipc.c | 1 +
> 1 file changed, 1 insertion(+)
Both patches have been applied. Thanks.
Johan
^ permalink raw reply [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).