mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-18 16:52:27 +00:00
Try-fix: Remove logging of actual payload strings (and compressed) for TAK packets (#3922)
* Remove logging of actual payload strings (and compressed) for TAK packets * Don't assert / reboot. Log error and skip decode
This commit is contained in:
@@ -311,7 +311,10 @@ bool perhapsDecode(meshtastic_MeshPacket *p)
|
||||
if (channels.decryptForHash(chIndex, p->channel)) {
|
||||
// Try to decrypt the packet if we can
|
||||
size_t rawSize = p->encrypted.size;
|
||||
assert(rawSize <= sizeof(bytes));
|
||||
if (rawSize > sizeof(bytes)) {
|
||||
LOG_ERROR("Packet too large to attempt decription! (rawSize=%d > 256)\n", rawSize);
|
||||
return false;
|
||||
}
|
||||
memcpy(bytes, p->encrypted.bytes,
|
||||
rawSize); // we have to copy into a scratch buffer, because these bytes are a union with the decoded protobuf
|
||||
crypto->decrypt(p->from, p->id, rawSize, bytes);
|
||||
|
||||
Reference in New Issue
Block a user