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

Commit f016e5b4 authored by Zero Liu's avatar Zero Liu Committed by huirong liao
Browse files

Fix coverity scan issue: array out of band

[Description]
Issue type: array out of band

Bug: 247905252
Test: avrcp function pass

Change-Id: Ief752b23a11811564c14c78a2a1c53d83cad6c71
parent 07dd21c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -439,7 +439,7 @@ void initialize_device(btif_rc_device_cb_t* p_dev) {

static btif_rc_device_cb_t* get_connected_device(int index) {
  BTIF_TRACE_DEBUG("%s: index: %d", __func__, index);
  if (index > BTIF_RC_NUM_CONN) {
  if (index >= BTIF_RC_NUM_CONN) {
    BTIF_TRACE_ERROR("%s: can't support more than %d connections", __func__,
                     BTIF_RC_NUM_CONN);
    return NULL;