Message-ID: <4e3b8ab7-50f0-460c-085c-403b9eb8763a@...2181...> Date: Tue, 17 May 2022 13:51:20 +0200 MIME-Version: 1.0 Content-Language: en-US References: <20220516185621.6182-1-kprovost@...2661...> <20220516185621.6182-2-kprovost@...2661...> From: Antonio Quartulli In-Reply-To: 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: Arne Schwabe , Kristof Provost , openvpn-devel Hi all, On 16/05/2022 21:32, Arne Schwabe wrote: > > 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