Fix (some ?) memory alignment issues on the crypto part - resulting in crashes or strange behavior (#4867)

* Replace multiple potentially non aligned pointer dereference (#4855)
First step to fix some Crypto crashes or strange behaviors

* Makes the two Crypto byte buffers aligned (#4855)
Fix #4855, and probably multiple Crypto problems depending on hardware

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
This commit is contained in:
TheMalkavien
2024-09-27 00:44:11 +02:00
committed by GitHub
parent 8f84a96b69
commit 4794cdb120
2 changed files with 11 additions and 11 deletions

View File

@@ -36,8 +36,8 @@ static MemoryDynamic<meshtastic_MeshPacket> staticPool;
Allocator<meshtastic_MeshPacket> &packetPool = staticPool;
static uint8_t bytes[MAX_LORA_PAYLOAD_LEN + 1];
static uint8_t ScratchEncrypted[MAX_LORA_PAYLOAD_LEN + 1];
static uint8_t bytes[MAX_LORA_PAYLOAD_LEN + 1] __attribute__ ((__aligned__));
static uint8_t ScratchEncrypted[MAX_LORA_PAYLOAD_LEN + 1] __attribute__ ((__aligned__));
/**
* Constructor