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

Commit 3b431747 authored by Ajay Panicker's avatar Ajay Panicker Committed by Android (Google) Code Review
Browse files

Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev

parents a86ef46c 3af0133b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "hcimsgs.h"
#include "l2c_int.h"
#include "l2cdefs.h"
#include "log/log.h"
#include "osi/include/osi.h"
#include "stack_config.h"

@@ -796,6 +797,10 @@ void l2cble_process_sig_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) {
      break;

    case L2CAP_CMD_DISC_REQ:
      if (p + 4 > p_pkt_end) {
        android_errorWriteLog(0x534e4554, "74121659");
        return;
      }
      STREAM_TO_UINT16(lcid, p);
      STREAM_TO_UINT16(rcid, p);