From: Josh Cepek Date: Thu, 16 May 2013 11:30:23 -0500 Message-ID: References: <1367608404-2257-1-git-send-email-gert@...1296...> Mime-Version: 1.0 In-Reply-To: <1367608404-2257-1-git-send-email-gert@...1296...> Subject: Re: [Openvpn-devel] [PATCH] Fix NULL-pointer crash in route_list_add_vpn_gateway(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: openvpn-devel@lists.sourceforge.net On 5/3/2013 14:13, Gert Doering wrote: > Add ASSERT() check to route_list_add_vpn_gateway() to ensure that *rl > is valid (and if not, crash with a somewhat more meaningful message than > "segmentation violation"). For the actual bugfix, change init code to > always allocate a "struct route_list" for IPv4, even if no --route options > have been seen in the config. > > Fix trac#281 and trac#258. > > Signed-off-by: Gert Doering ACK to the fix. As briefly discussed online, in the long-term the route_list_add_vpn_gateway() call in forward.c should probably be moved to a better location; it sounds like that's already in the works for a future changeset (and not required to fix this crash.) -- Josh Cepek