Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5bff89f

Browse filesBrowse files
william-ferguson-aume-no-dev
authored andcommitted
Fixed issue-3153 - Allocating enough memory to construct the entire UUID as a String. (espressif#3297)
1 parent 9bbd720 commit 5bff89f
Copy full SHA for 5bff89f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎libraries/BLE/src/BLEUUID.cpp

Copy file name to clipboardExpand all lines: libraries/BLE/src/BLEUUID.cpp
+1-1Lines changed: 1 addition & 1 deletion
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 data, 4 for '-' delimiters and one for a terminator == 37 chars
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.