summaryrefslogtreecommitdiff
path: root/android/test-ipc.c
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2014-02-11 14:32:30 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-02-12 11:26:56 +0200
commit10be885113083568bda5a098eef40d08b775bc28 (patch)
tree262c9df873fab7ead881fe8cd6754cc427d85f89 /android/test-ipc.c
parente6c0fa067b63e7fa530ce86b711ea2b7291bd743 (diff)
downloadbluez-10be885113083568bda5a098eef40d08b775bc28.tar.gz
android/test-ipc: Fix crash due to invalid ipc_register() parameter
This test checks for proper handling of invalid Service ID on a IPC message, but it was attempting to register handlers for this invalid ID, which on current ipc_register() implementation was causing a buffer overrun. The fix was to use a valid ID during registration, but still attempt to use an invalid one when sending the message.
Diffstat (limited to 'android/test-ipc.c')
-rw-r--r--android/test-ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/test-ipc.c b/android/test-ipc.c
index 3c2b5435c..851b5fdf3 100644
--- a/android/test-ipc.c
+++ b/android/test-ipc.c
@@ -527,7 +527,7 @@ static const struct hal_hdr test_cmd_service_offrange_hdr = {
static const struct test_data test_cmd_service_offrange = {
.cmd = &test_cmd_service_offrange_hdr,
.cmd_size = sizeof(struct hal_hdr),
- .service = HAL_SERVICE_ID_MAX + 1,
+ .service = 0,
.handlers = cmd_handlers,
.handlers_size = 1,
.expected_signal = SIGTERM