From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 9658F469719 for ; Sun, 16 Feb 2020 18:11:41 +0300 (MSK) References: <20200215093156.32021-1-olegrok@tarantool.org> <55bad826-7af6-cf0b-b917-743c07d94d62@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Sun, 16 Feb 2020 16:11:38 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Oleg Babin , tarantool-patches@dev.tarantool.org, alexander.turenko@tarantool.org LGTM. On 15/02/2020 18:37, Oleg Babin wrote: > Hi! Thanks for your review! > > On 15/02/2020 19:15, Vladislav Shpilevoy wrote: >>> However situation then uri.format output is zero-length >> >> then -> when. >> > > Fixed. Thanks. I've updated commit message. > >> Lets add a dot to the end of the sentence, and elaborate >> a little about why do we call static_alloc() before this >> test and fill it with something. You and me are in the context, >> but for someone, who doesn't know the issue and looks at this >> test it may look strange. > > Yes. I've added following comment: >     -- As static allocator is also used in several places >     -- we should properly handle situation when output >     -- is zero-length string. >     -- Here we allocate the whole buffer, >     -- fill it with some "junk" bytes and >     -- check that result doesn't contain any of them. > > I've force-pushed updates to my branch: > https://github.com/tarantool/tarantool/tree/olegrok/4779-uri-format-junk-output