X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=bta%2Fhh%2Fbta_hh_act.c;h=7d0e5bd0b3e0fb267fd383aa67e96fcc8bdb7c23;hb=8ec7232610d39d589e0d21e7c6aa76e4d128b9c3;hp=f799e67e4d59266bdc816268d4e1cc2169a24ccc;hpb=5b37f79e69991cebb18f3d08230f5c86e48f8091;p=android-x86%2Fsystem-bt.git diff --git a/bta/hh/bta_hh_act.c b/bta/hh/bta_hh_act.c index f799e67e4..7d0e5bd0b 100644 --- a/bta/hh/bta_hh_act.c +++ b/bta/hh/bta_hh_act.c @@ -26,6 +26,7 @@ #if defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE) +#include #include #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) APPL_TRACE_DEBUG("Ctrl DATA received w4: event[%s]", bta_hh_get_w4_event(p_cb->w4_evt)); #endif + if (pdata->len == 0) { + android_errorWriteLog(0x534e4554, "116108738"); + p_cb->w4_evt = 0; + osi_free_and_reset((void**)&pdata); + return; + } hs_data.status = BTA_HH_OK; hs_data.handle = p_cb->hid_handle;