Merge pull request #3945 from MarkRose/fix/contact-name-nul
Terminate contact names received from the companion app 🤖🤖
This commit is contained in:
commit
bda1c586f1
4 files changed
+9
-8
No files matched your search
@@ -202,6 +202,7 @@ void MyMesh::updateContactFromFrame(ContactInfo &contact, uint32_t& last_mod, co
|
||||
memcpy(contact.out_path, &frame[i], MAX_PATH_SIZE);
|
||||
i += MAX_PATH_SIZE;
|
||||
memcpy(contact.name, &frame[i], 32);
|
||||
contact.name[sizeof(contact.name) - 1] = 0; // the app is not trusted to NUL-terminate
|
||||
i += 32;
|
||||
memcpy(&contact.last_advert_timestamp, &frame[i], 4);
|
||||
i += 4;
|
||||
|
||||
Reference in new issue
Block a user