diff options
author | dequis <dx@dxzone.com.ar> | 2015-12-09 04:46:21 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-12-09 04:46:21 -0300 |
commit | dbca297b4c3843ee82fa0531f47543a5cbb6f9d3 (patch) | |
tree | 287840677f90f3e60f6a3d8a3ce1a9344a5f4711 /lib/proxy.c | |
parent | 459dec8db85fdadba8e2ddeb2cf46b4992360e95 (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.
Diffstat (limited to 'lib/proxy.c')
-rw-r--r-- | lib/proxy.c | 2 |
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; |