[Tarantool-patches] [PATCH] lua: handle uri.format empty input properly

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Feb 16 18:11:38 MSK 2020


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


More information about the Tarantool-patches mailing list