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:
afd7fad
)
android: Simply exit if hal_ipc_cmd gets an invalid fd
author
Johan Hedberg
<johan.hedberg@intel.com>
Tue, 22 Oct 2013 14:00:30 +0000
(17:00 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Tue, 22 Oct 2013 14:01:55 +0000
(17:01 +0300)
android/hal-ipc.c
patch
|
blob
|
history
diff --git
a/android/hal-ipc.c
b/android/hal-ipc.c
index
f753f10
..
cd3e266
100644
(file)
--- a/
android/hal-ipc.c
+++ b/
android/hal-ipc.c
@@
-260,8
+260,10
@@
int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param,
char cmsgbuf[CMSG_SPACE(sizeof(int))];
struct hal_msg_rsp_error err;
- if (cmd_sk < 0)
- return -EBADF;
+ if (cmd_sk < 0) {
+ error("Invalid cmd socket passed to hal_ipc_cmd, aborting");
+ exit(EXIT_FAILURE);
+ }
if (!rsp || rsp_len == 0) {
memset(&err, 0, sizeof(err));