mirror of https://github.com/ARMmbed/mbed-os.git
BLE: Fix out of range memory access in trace helper.
parent
db9428f18f
commit
e001098699
|
@ -56,10 +56,10 @@ static inline char* to_string(const UUID& uuid)
|
||||||
static char string_buffer[Row_Count][UUID::LENGTH_OF_LONG_UUID + /* Number of hyphen delimiters =*/ 4];
|
static char string_buffer[Row_Count][UUID::LENGTH_OF_LONG_UUID + /* Number of hyphen delimiters =*/ 4];
|
||||||
static uint8_t idx = 0;
|
static uint8_t idx = 0;
|
||||||
|
|
||||||
|
++idx;
|
||||||
|
|
||||||
if (idx == Row_Count) {
|
if (idx == Row_Count) {
|
||||||
idx= 0;
|
idx= 0;
|
||||||
} else {
|
|
||||||
idx++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char* p1 = (char *)Buffer + Length - 1;
|
char* p1 = (char *)Buffer + Length - 1;
|
||||||
|
|
Loading…
Reference in New Issue