diff options
author | Sharvil Nanavati <sharvil@google.com> | 2016-06-20 19:16:12 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-08-02 01:12:33 -0700 |
commit | 791c2192a9a19e42d8a396b0e46e1b15feb542cb (patch) | |
tree | 32c97666df9efaadc8206ea0499cf2480d2b8829 /btif/src/btif_hh.c | |
parent | 0e94bd5ac42a4621c873c8c2af4aa2aced3c6442 (diff) | |
download | android_system_bt-791c2192a9a19e42d8a396b0e46e1b15feb542cb.tar.gz android_system_bt-791c2192a9a19e42d8a396b0e46e1b15feb542cb.tar.bz2 android_system_bt-791c2192a9a19e42d8a396b0e46e1b15feb542cb.zip |
Fix potential DoS caused by delivering signal to BT processstable/cm-13.0-ZNH2K
Ticket: CYNGNOS-3177
Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Diffstat (limited to 'btif/src/btif_hh.c')
-rw-r--r-- | btif/src/btif_hh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c index 88e767a91..e78bfc234 100644 --- a/btif/src/btif_hh.c +++ b/btif/src/btif_hh.c @@ -237,7 +237,7 @@ static void toggle_os_keylockstates(int fd, int changedlockstates) BTIF_TRACE_DEBUG("%s: %x %x %x", __FUNCTION__, hidreport[6], hidreport[7], hidreport[8]); bta_hh_co_write(fd , hidreport, sizeof(hidreport)); - usleep(200000); + TEMP_FAILURE_RETRY(usleep(200000)); memset(hidreport,0,9); hidreport[0]=1; BTIF_TRACE_DEBUG("Writing hidreport #2 to os: "\ @@ -332,7 +332,7 @@ static void sync_lockstate_on_connect(btif_hh_device_t *p_dev) BTIF_TRACE_DEBUG("%s: Sending hid report to kernel "\ "indicating lock key state 0x%x",__FUNCTION__, keylockstates); - usleep(200000); + TEMP_FAILURE_RETRY(usleep(200000)); toggle_os_keylockstates(p_dev->fd, keylockstates); } else |