aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-12-09 04:46:21 -0300
committerdequis <dx@dxzone.com.ar>2015-12-09 04:46:21 -0300
commitdbca297b4c3843ee82fa0531f47543a5cbb6f9d3 (patch)
tree287840677f90f3e60f6a3d8a3ce1a9344a5f4711
parent459dec8db85fdadba8e2ddeb2cf46b4992360e95 (diff)
proxy: fix validation of the proxytype value
Coverity says it could be an out of bounds read, but the value is set internally, so not really. Still, good point about the condition being wrong.
-rw-r--r--lib/proxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/proxy.c b/lib/proxy.c
index af30cf4f..61a89f59 100644
--- a/lib/proxy.c
+++ b/lib/proxy.c
@@ -541,7 +541,7 @@ int proxy_connect(const char *host, int port, b_event_handler func, gpointer dat
phb->func = func;
phb->data = data;
- if (proxyhost[0] && proxyport > 0 && proxytype >= 0 && proxytype <= G_N_ELEMENTS(proxy_connect_funcs_array)) {
+ if (proxyhost[0] && proxyport > 0 && proxytype >= 0 && proxytype < G_N_ELEMENTS(proxy_connect_funcs_array)) {
fun = proxy_connect_funcs_array[proxytype];
} else {
fun = proxy_connect_none;