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

Commit b0ff1b81 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE: Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into nyc-dev

parents a5d790e7 86beb8f5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "hcimsgs.h"
#include "device/include/controller.h"
#include "stack_config.h"
#include "log/log.h"

#if (BLE_INCLUDED == TRUE)

@@ -829,6 +830,10 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
            break;

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