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

Commit 194fb24c authored by Hansong Zhang's avatar Hansong Zhang Committed by android-build-team Robot
Browse files

Fix a wrong check in rfc_parse_data

Bug: 78288018
Bug: 111436796
Test: manual
Change-Id: I16e6026acbaac230fe1453bbac040d1b75bcea2a
(cherry picked from commit 0638556e)
parent 865a62fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -520,7 +520,7 @@ uint8_t rfc_parse_data(tRFC_MCB* p_mcb, MX_FRAME* p_frame, BT_HDR* p_buf) {


  eal = *(p_data)&RFCOMM_EA;
  eal = *(p_data)&RFCOMM_EA;
  len = *(p_data)++ >> RFCOMM_SHIFT_LENGTH1;
  len = *(p_data)++ >> RFCOMM_SHIFT_LENGTH1;
  if (eal == 0 && p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
  if (eal == 0 && p_buf->len > RFCOMM_CTRL_FRAME_LEN) {
    len += (*(p_data)++ << RFCOMM_SHIFT_LENGTH2);
    len += (*(p_data)++ << RFCOMM_SHIFT_LENGTH2);
  } else if (eal == 0) {
  } else if (eal == 0) {
    RFCOMM_TRACE_ERROR("Bad Length when EAL = 0: %d", p_buf->len);
    RFCOMM_TRACE_ERROR("Bad Length when EAL = 0: %d", p_buf->len);