Skip to content

Commit 991ebf7

Browse files
1 parent d8c5ecc commit 991ebf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/BLE/src/BLEUUID.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ std::string BLEUUID::toString() {
367367
//
368368
// UUID string format:
369369
// AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP
370-
auto size = 35;
370+
auto size = 37; // 32 for UUID, 4 for '-' delimiters and 1 for the null terminator = 37
371371
char *hex = (char *)malloc(size);
372372
snprintf(hex, size, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
373373
m_uuid.uuid.uuid128[15], m_uuid.uuid.uuid128[14],

0 commit comments

Comments
 (0)