BLE: Fix out of range memory access in trace helper.

pull/14198/head
Vincent Coubard 2021-01-27 11:35:33 +00:00 committed by Paul Szczepanek
parent db9428f18f
commit e001098699
1 changed files with 2 additions and 2 deletions

View File

@ -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 uint8_t idx = 0;
++idx;
if (idx == Row_Count) {
idx= 0;
} else {
idx++;
}
char* p1 = (char *)Buffer + Length - 1;