esp_wireguard icon indicating copy to clipboard operation
esp_wireguard copied to clipboard

Crash on esp32s3

Open eroom1966 opened this issue 11 months ago • 3 comments

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

eroom1966 avatar Mar 20 '24 17:03 eroom1966