BUG/MINOR: lua: set buffer size during map lookups
authorThierry Fournier <thierry.fournier@ozon.io>
Tue, 10 Nov 2020 19:38:20 +0000 (20:38 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 12 Nov 2020 14:19:58 +0000 (15:19 +0100)
commit66e9ff531481d6a043ea402cb303f36b3d9ca9e1
tree9355c3d2dfdec8c7aea5c6d52ed1e3958ea326d0
parent9633f444ac3ae540f6ce5dd0b0880fb40fabe9d5
BUG/MINOR: lua: set buffer size during map lookups

This size is used by some pattern matching to determine if there
is sufficient room in the buffer to add final \0 if necessary.
If the size is not set, the conditions use uninitialized value.

Note: it seems this bug can't cause a crash.

Should be backported until 2.2 (at least)

(cherry picked from commit 91dc0c0d8fdc2fb091b49699ebb323d01aa1d9f6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/hlua.c