Skip to content

Commit e001098

Browse files
pan-paul-szczepanek-arm
authored andcommitted
BLE: Fix out of range memory access in trace helper.
1 parent db9428f commit e001098

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connectivity/FEATURE_BLE/source/common/ble_trace_helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ static inline char* to_string(const UUID& uuid)
5656
static char string_buffer[Row_Count][UUID::LENGTH_OF_LONG_UUID + /* Number of hyphen delimiters =*/ 4];
5757
static uint8_t idx = 0;
5858

59+
++idx;
60+
5961
if (idx == Row_Count) {
6062
idx= 0;
61-
} else {
62-
idx++;
6363
}
6464

6565
char* p1 = (char *)Buffer + Length - 1;

0 commit comments

Comments
 (0)