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

Commit 72a995be authored by Andre Eisenbach's avatar Andre Eisenbach Committed by android-build-merger
Browse files

SDP: Bounds check 'id' parameter for free_sdp_slot() am: 91f3d4b8 am: d2fcb151 am: 0887102f

am: 6b2f4de8

Change-Id: I41ed5d1d9f8efa504941b7084aa955496dfe0ec3
parents 41c718d6 6b2f4de8
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -215,7 +215,8 @@ static int alloc_sdp_slot(bluetooth_sdp_record* in_record) {
static int free_sdp_slot(int id) {
static int free_sdp_slot(int id) {
    int handle = -1;
    int handle = -1;
    bluetooth_sdp_record* record = NULL;
    bluetooth_sdp_record* record = NULL;
    if(id >= MAX_SDP_SLOTS) {
    if(id < 0 || id >= MAX_SDP_SLOTS) {
        android_errorWriteLog(0x534e4554, "37502513");
        APPL_TRACE_ERROR("%s() failed - id %d is invalid", __func__, id);
        APPL_TRACE_ERROR("%s() failed - id %d is invalid", __func__, id);
        return handle;
        return handle;
    }
    }