summaryrefslogtreecommitdiff
path: root/android/hal-ipc.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2013-10-23 15:46:23 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-23 19:32:16 +0300
commitf94baef84e3e98cd94dc7f8662a5f6f24135c124 (patch)
tree36167fddd93b516251d0656525cbab46f70d6e61 /android/hal-ipc.c
parent280d52cefd28b452cd4e4c2fa6e5ba0c063dd94d (diff)
downloadbluez-f94baef84e3e98cd94dc7f8662a5f6f24135c124.tar.gz
android/hal: Fix crash while receiving notification
This fix following crash: Invalid read of size 8 at 0x408B33: notification_handler (hal-ipc.c:122) by 0x4E39E99: start_thread (pthread_create.c:308) Address 0x8 is not stack'd, malloc'd or (recently) free'd
Diffstat (limited to 'android/hal-ipc.c')
-rw-r--r--android/hal-ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index e8bba1102..97a3d295c 100644
--- a/android/hal-ipc.c
+++ b/android/hal-ipc.c
@@ -118,7 +118,7 @@ static void *notification_handler(void *data)
fd = -1;
/* Receive auxiliary data in msg */
- for (cmsg = CMSG_FIRSTHDR(&msg); !cmsg;
+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg;
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET
&& cmsg->cmsg_type == SCM_RIGHTS) {