• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revision8ec7232610d39d589e0d21e7c6aa76e4d128b9c3 (tree)
Time2018-11-06 06:52:57
AuthorMyles Watson <mylesgw@goog...>
CommiterRohit Yengisetty

Log Message

DO NOT MERGE: HH: Check parameter length in bta_hh_ctrl_dat_act

Bug: 116108738
Test: send a malformed GET_IDLE command with no parameters
Change-Id: Ic57e748a06ea6d4fc16868310d3423ee71a7ac8c
(cherry picked from commit a4a11e198164027f86e74e10aa68b9327df5b589)

Change Summary

Incremental Difference

--- a/bta/hh/bta_hh_act.c
+++ b/bta/hh/bta_hh_act.c
@@ -26,6 +26,7 @@
2626
2727 #if defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE)
2828
29+#include <log/log.h>
2930 #include <string.h>
3031
3132 #include "bta_sys.h"
@@ -764,6 +765,12 @@ void bta_hh_ctrl_dat_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA * p_data)
764765 APPL_TRACE_DEBUG("Ctrl DATA received w4: event[%s]",
765766 bta_hh_get_w4_event(p_cb->w4_evt));
766767 #endif
768+ if (pdata->len == 0) {
769+ android_errorWriteLog(0x534e4554, "116108738");
770+ p_cb->w4_evt = 0;
771+ osi_free_and_reset((void**)&pdata);
772+ return;
773+ }
767774 hs_data.status = BTA_HH_OK;
768775 hs_data.handle = p_cb->hid_handle;
769776