summaryrefslogtreecommitdiffstats
path: root/hci/src/hci_layer.c
diff options
context:
space:
mode:
authorSharvil Nanavati <sharvil@google.com>2016-06-20 19:16:12 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-08-01 17:04:08 -0700
commitcbe91a68210f39e8d3328f5df65e370c5bf4763b (patch)
tree34e343fc72d6b8ea02649c6e626ece14f7c79367 /hci/src/hci_layer.c
parente801523fb867d27fa8b0a571d62c0ed28005c127 (diff)
downloadandroid_system_bt-stable/cm-13.0-ZNH0E.tar.gz
android_system_bt-stable/cm-13.0-ZNH0E.tar.bz2
android_system_bt-stable/cm-13.0-ZNH0E.zip
Fix potential DoS caused by delivering signal to BT processstable/cm-13.0-ZNH0E
Ticket: CYNGNOS-3177 Bug: 28885210 Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Diffstat (limited to 'hci/src/hci_layer.c')
-rw-r--r--hci/src/hci_layer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hci/src/hci_layer.c b/hci/src/hci_layer.c
index a6c9a93f7..ed1c7eec3 100644
--- a/hci/src/hci_layer.c
+++ b/hci/src/hci_layer.c
@@ -20,6 +20,7 @@
#include <assert.h>
#include <cutils/properties.h>
+#include <errno.h>
#include <string.h>
#include <signal.h>
#include <string.h>
@@ -531,7 +532,7 @@ static void command_timed_out(UNUSED_ATTR void *context) {
LOG_ERROR("%s restarting the bluetooth process.", __func__);
ssr_cleanup(0x22);//SSR reasno 0x22 = CMD TO
- usleep(20000);
+ TEMP_FAILURE_RETRY(usleep(20000));
//Reset SOC status to trigger hciattach service
if (property_set("bluetooth.status", "off") < 0) {
LOG_ERROR("hci_cmd_timeout: Error resetting SOC status\n ");