From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 21DB9469719 for ; Tue, 18 Feb 2020 08:23:46 +0300 (MSK) Date: Tue, 18 Feb 2020 08:23:45 +0300 From: Kirill Yukhin Message-ID: <20200218052345.s5l5qve6fxkrb6or@tarantool.org> References: <20200215093156.32021-1-olegrok@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200215093156.32021-1-olegrok@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] lua: handle uri.format empty input properly List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: olegrok@tarantool.org Cc: Oleg Babin , tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Hello, On 15 фев 12:31, olegrok@tarantool.org wrote: > From: Oleg Babin > > After 7fd6c8096343ca254fec10c2ce8a8233ebe47028 > (buffer: port static allocator to Lua) uri started to use > static_allocator - cyclic buffer that also is used in > several modules. > > However situation then uri.format output is zero-length > string was not handled properly and ffi.string could > return data that was previously written in static buffer > because use as string terminator the first zero byte. > > To prevent such situation let's pass result length explicitly. > > Closes #4779 I've checked your patch into 2.2, 2.3 and master. Please, in future accompany your patch w/ a release notes entry. Also, please set your e-mail address in git settings to @tarantool. -- Regards, Kirill Yukhin