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

Commit 35d290a9 authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "Fix an OOB bug in gatt_dbg_op_name" into tm-dev am: c87c558f

parents 9a0637dc c87c558f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1639,10 +1639,12 @@ uint8_t* gatt_dbg_op_name(uint8_t op_code) {
    pseduo_op_code_idx = 0x15; /* just an index to op_code_name */
  }

  if (pseduo_op_code_idx <= GATT_OP_CODE_MAX)
  #define ARR_SIZE(a) (sizeof(a)/sizeof(a[0]))
  if (pseduo_op_code_idx < ARR_SIZE(op_code_name))
    return (uint8_t*)op_code_name[pseduo_op_code_idx];
  else
    return (uint8_t*)"Op Code Exceed Max";
  #undef ARR_SIZE
}

/** Remove the application interface for the specified background device */