OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
280d52c
)
android/hal: Fix crash while receiving notification
author
Szymon Janc
<szymon.janc@tieto.com>
Wed, 23 Oct 2013 13:46:23 +0000
(15:46 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Wed, 23 Oct 2013 16:32:16 +0000
(19:32 +0300)
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
android/hal-ipc.c
patch
|
blob
|
history
diff --git
a/android/hal-ipc.c
b/android/hal-ipc.c
index
e8bba11
..
97a3d29
100644
(file)
--- 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) {