Zero pad fixed-width Companion channel names in USB and BLE replies
This commit is contained in:
1 parent
d34e65175b
commit
f8b5b8301e
2 files changed
+90
-1
No files matched your search
@@ -6983,7 +6983,9 @@ void MyMesh::handleCmdFrame(size_t len) {
|
||||
int i = 0;
|
||||
out_frame[i++] = RESP_CODE_CHANNEL_INFO;
|
||||
out_frame[i++] = channel_idx;
|
||||
strcpy((char *)&out_frame[i], channel.name);
|
||||
// This fixed-width field must not retain bytes from an earlier reply.
|
||||
strncpy((char *)&out_frame[i], channel.name, 32);
|
||||
out_frame[i + 31] = 0;
|
||||
i += 32;
|
||||
size_t key_size = 16; // Original app response remains byte-for-byte compatible.
|
||||
#if MESH_ENABLE_MESHTEXT_CHAT
|
||||
|
||||
Reference in new issue
Block a user