diff options
author | Gert Doering <gert@greenie.muc.de> | 2011-08-16 20:05:13 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-08-24 14:24:56 +0200 |
commit | f0257abb14423de5ee24444360fbb474555ef3cf (patch) | |
tree | 8462fbd8a4f2126ecb3507a9f250466c469b44bd /route.h | |
parent | ca18a638aa7cf316611f893127ba44131e57083c (diff) | |
download | openvpn-f0257abb14423de5ee24444360fbb474555ef3cf.tar.gz openvpn-f0257abb14423de5ee24444360fbb474555ef3cf.tar.xz openvpn-f0257abb14423de5ee24444360fbb474555ef3cf.zip |
For all accesses to "struct route_list * rl", check first that rl is non-NULL
In IPv4-only mode, this cannot happen, but if IPv6 is enabled
and a servers pushes IPv6 routes and no IPv4 routes -> crash boom.
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-By: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'route.h')
-rw-r--r-- | route.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -328,7 +328,7 @@ route_list_vpn_gateway_needed (const struct route_list *rl) static inline int route_did_redirect_default_gateway(const struct route_list *rl) { - return BOOL_CAST(rl->iflags & RL_DID_REDIRECT_DEFAULT_GATEWAY); + return rl && BOOL_CAST(rl->iflags & RL_DID_REDIRECT_DEFAULT_GATEWAY); } #endif |