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

Browse filesBrowse files
committed
Fix possible string overflow in BTAdvertisedDeviceSet::toString()
1 parent 41c372c commit 57cf2fb
Copy full SHA for 57cf2fb

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-2
lines changed

‎libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp

Copy file name to clipboardExpand all lines: libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ std::string BTAdvertisedDeviceSet::toString() {
4747
res += val;
4848
}
4949
if (haveRSSI()) {
50-
char val[4];
51-
snprintf(val, sizeof(val), "%d", getRSSI());
50+
char val[6];
51+
snprintf(val, sizeof(val), "%d", (int8_t)getRSSI());
5252
res += ", rssi: ";
5353
res += val;
5454
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.