8000 Fixed issue-3153 - Allocating enough memory to construct the entire U… · templatetuners/arduino-esp32@5bff89f · GitHub
[go: up one dir, main page]

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 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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/BLE/src/BLEUUID.cpp

Lines 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 4FE5 = 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