Skip to content
Snippets Groups Projects
Commit 8d9652d9 authored by Oleg Babin's avatar Oleg Babin Committed by Kirill Yukhin
Browse files

lua: handle uri.format empty input properly

After 7fd6c809
(buffer: port static allocator to Lua) uri started to use
static_allocator - cyclic buffer that also is used in
several modules.

However situation when 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

(cherry picked from commit 57f6fc93)
parent 9e403e42
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment