Message-ID: Date: Mon, 16 May 2022 21:32:06 +0200 MIME-Version: 1.0 References: <20220516185621.6182-1-kprovost@...2661...> <20220516185621.6182-2-kprovost@...2661...> From: Arne Schwabe In-Reply-To: <20220516185621.6182-2-kprovost@...2661...> Subject: Re: [Openvpn-devel] [PATCH 1/4] mtcp: Handle multi_create_instance() returning NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: Kristof Provost , openvpn-devel Am 16.05.2022 um 20:56 schrieb Kristof Provost via Openvpn-devel: > From: Kristof Provost > > multi_create_instance() can fail (i.e. return NULL). > multi_create_instance_tcp() is ready for this, but called > multi_assign_peer_id() without first checking if mi was non-NULL. > multi_assign_peer_id() assumed that mi is non-NULL, dereferencing it and > causing a crash. > > Move the call to multi_assign_peer_id() after the mi NULL check. > I did add multi_assign_peer there iirc but Kristof is right. Acked-By: Arne Schwabe