projects
/
project
/
omcproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfba2aa
)
Fix null pointer access in proxy_set
author
Andrew Rodland
<andrew@cleverdomain.org>
Tue, 10 Oct 2023 17:30:28 +0000
(13:30 -0400)
committer
GitHub
<noreply@github.com>
Tue, 10 Oct 2023 17:30:28 +0000
(13:30 -0400)
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>
src/proxy.c
patch
|
blob
|
history
diff --git
a/src/proxy.c
b/src/proxy.c
index 67c91a7c2c0e60628fc29d441e9c7648a137ae17..8114763b01b118e4271844aa4a04f4a5f38ccbde 100644
(file)
--- 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 (p
roxy
->ifindex == uplink)
+ if (p->ifindex == uplink)
proxy = p;
if (proxy && (downlinks_cnt == 0 ||