Date: Tue, 2 Feb 2016 14:11:22 -0500 From: Michael McConville Message-ID: <20160202191122.GE1675@...2119...> Subject: [Openvpn-devel] [PATCH] Fix undefined signed shift overflow List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline To: openvpn-devel@lists.sourceforge.net Originally discussed here: https://github.com/OpenVPN/openvpn/pull/42 Thanks for your time, Michael diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 2012b5c..f4dee78 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -3128,7 +3128,8 @@ get_default_gateway (struct route_gateway_info *rgi) struct gc_arena gc = gc_new (); struct rtmsg m_rtmsg; int sockfd = -1; - int seq, l, pid, rtm_addrs, i; + int seq, l, pid, rtm_addrs; + unsigned int i; struct sockaddr so_dst, so_mask; char *cp = m_rtmsg.m_space; struct sockaddr *gate = NULL, *ifp = NULL, *sa; @@ -3330,7 +3331,8 @@ get_default_gateway_ipv6(struct route_ipv6_gateway_info *rgi6, struct rtmsg m_rtmsg; int sockfd = -1; - int seq, l, pid, rtm_addrs, i; + int seq, l, pid, rtm_addrs; + unsigned int i; struct sockaddr_in6 so_dst, so_mask; char *cp = m_rtmsg.m_space; struct sockaddr *gate = NULL, *ifp = NULL, *sa;