esp_wireguard
esp_wireguard copied to clipboard
Crash on esp32s3
Hi @trombik
many thanks for this repo. I wanted to mention that I had a crash which I was unable to reproduce in this code
static struct wireguard_peer *peer_lookup_by_allowed_ip(struct wireguard_device *device, const ip_addr_t *ipaddr) {
...
tmp = &device->peers[x];
if (tmp->valid) {
As far as I can see tmp was NULL, and hence there was no dereference to tmp->valid
I have not been able to reproduce, but maybe this will give you an indication
I was going to make a trivial fix to change to
if (tmp && tmp->valid) {
I will leave to you to decide
Thx Lee