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

Kirill Yukhin kyukhin at tarantool.org
Tue Feb 18 08:23:45 MSK 2020


Hello,

On 15 фев 12:31, olegrok at tarantool.org wrote:
> From: Oleg Babin <babinoleg at mail.ru>
> 
> 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


More information about the Tarantool-patches mailing list