]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: httpclient/lua: return an error on argument check
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 24 Sep 2021 12:51:44 +0000 (14:51 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 24 Sep 2021 12:57:15 +0000 (14:57 +0200)
commit79416cbd7abe63265d92f4c4dc0bc51a7cb2cf11
treefd640ae0ba5568e7476a47fd9bb3c917d66517d7
parentd7df73a114a82cd70c5ec0a2d5d48b023c28ffa5
BUG/MINOR: httpclient/lua: return an error on argument check

src/hlua.c:7074:6: error: variable 'url_str' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        if (lua_type(L, -1) == LUA_TSTRING)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hlua.c:7079:36: note: uninitialized use occurs here
        hlua_hc->hc->req.url = istdup(ist(url_str));
                                          ^~~~~~~

Return an error on the stack if the argument is not a string.
src/hlua.c