Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 841a7e33 authored by Myles Watson's avatar Myles Watson Committed by android-build-merger
Browse files

Merge "HH: Check parameter length in bta_hh_ctrl_dat_act" into pi-dev am: 31a58395

am: 4c2f547d

Change-Id: Ib56cc1b9c222887c5a51a91ee8a691cee15f9ec0
parents ef8776e0 4c2f547d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#if (BTA_HH_INCLUDED == TRUE)

#include <log/log.h>
#include <string.h>

#include "bta_hh_co.h"
@@ -722,6 +723,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;