References: <1563442503-11119-1-git-send-email-lstipakov@...277...> From: Antonio Quartulli Message-ID: <07cba947-e868-4b1d-7381-fed1ae55ace3@...2181...> Date: Thu, 18 Jul 2019 14:20:40 +0200 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Subject: Re: [Openvpn-devel] [PATCH] crypto.c: fix Visual Studio build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Lev Stipakov Cc: openvpn-devel On 18/07/2019 14:20, Lev Stipakov wrote: > Hi, > > >> Are we sure we can't call this function with 'len' longer than the >> available space in 'key' ? > > > Yep, because we get available space here: > >> + const int len = BCAP(key); >> > > and then pass it to rand_bytes: > Ok, that sounds good, thanks! > >>> + if (!rand_bytes(BEND(key), len)) > > -- Antonio Quartulli