diff options
| author | Andrew Rodland | 2023-10-10 17:30:28 +0000 |
|---|---|---|
| committer | GitHub | 2023-10-10 17:30:28 +0000 |
| commit | 2f09056800000c8e5d3c72869555f4b1a7cea10a (patch) | |
| tree | 471abbb6a04ded14d5fb59b4cb07aaae0f9cf408 | |
| parent | bfba2aa75802ff1a70ef2fd3eba53409a8c6e93a (diff) | |
| download | omcproxy-2f09056800000c8e5d3c72869555f4b1a7cea10a.tar.gz | |
Fix null pointer access in proxy_set
We were checking `proxy->ifindex`, but `proxy` is initialized to NULL. Should be checking `p->ifindex` instead.
Signed-off-by: Andrew Rodland <andrew@cleverdomain.org>
| -rw-r--r-- | src/proxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proxy.c b/src/proxy.c index 67c91a7..8114763 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -126,7 +126,7 @@ int proxy_set(int uplink, const int downlinks[], size_t downlinks_cnt, enum prox { struct proxy *proxy = NULL, *p; list_for_each_entry(p, &proxies, head) - if (proxy->ifindex == uplink) + if (p->ifindex == uplink) proxy = p; if (proxy && (downlinks_cnt == 0 || |