]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua: fixing ambiguous sizeof in hlua_load_per_thread
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 23 Sep 2022 06:48:34 +0000 (08:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 23 Sep 2022 07:50:11 +0000 (09:50 +0200)
commitb12d169ea37b0c1740cf5874f870889e3356a91b
tree5fec42757f51db8226f4e9f7fe453e5644f07166
parentec059c249e3ab8512bea14628e0032c36b89a80b
BUG/MINOR: hlua: fixing ambiguous sizeof in hlua_load_per_thread

As pointed out by chipitsine in GH #1879, coverity complains
about a sizeof with char ** type where it should be char *.

This was introduced in 'MINOR: hlua: Allow argument on
lua-lod(-per-thread) directives' (ae6b568)

Luckily this had no effect so far because on most platforms
sizeof(char **) == sizeof(char *), but this can not be safely
assumed for portability reasons.

The fix simply changes the argument to sizeof so that it refers to
'*per_thread_load[len]' instead of 'per_thread_load[len]'.

No backport needed.
src/hlua.c