]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua: Don't strip last non-LWS char in hlua_pushstrippedstring()
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Mar 2021 18:36:51 +0000 (19:36 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Mar 2021 18:48:12 +0000 (19:48 +0100)
commit2ec4e3c1acf95bcdc56028bbefe1a355c457b978
tree7e470a0d93d943f1bd196633ac109ea4a96d7e84
parenta47dfab673a129cb44ddc92dd41aaa22af507ee3
BUG/MINOR: hlua: Don't strip last non-LWS char in hlua_pushstrippedstring()

hlua_pushstrippedstring() function strips leading and trailing LWS
characters. But the result length it too short by 1 byte. Thus the last
non-LWS character is stripped. Note that a string containing only LWS
characters resulting to a stipped string with an invalid length (-1). This
leads to a lua runtime error.

This bug was reported in the issue #1155. It must be backported as far as
1.7.
src/hlua_fcn.c