Closed daurnimator closed 8 years ago
Fixed in 40dc68c3268c6919941c811ed72a2a53a76cdb91
grr, now it potentially can leak..
Ok, fixed in 103fbe1b8656dffa1e14a54ad83e559e3e98a1e5
Thanks. That looks better.
Though this is still a problem in e.g. pgsql_encryptPassword
. The gcmalloc
pushes a userdata onto the stack. You need to move the luaL_checkstring
s to the top of the functions.
Am 11.05.2016 um 10:28 schrieb daurnimator notifications@github.com:
Though this is still a problem in e.g. pgsql_encryptPassword. The gcmalloc pushes a userdata onto the stack. You need to move the luaL_checkstrings to the top of the functions.
It would do no harm, since I use absolute indexes, but you are right, it's nicer to check first. I'll change that.
It would do no harm, since I use absolute indexes, but you are right, it's nicer to check first. I'll change that.
It does create incorrect error messages.
e.g. if I call pgsql_encryptPassword
with no arguments it will tell me string expected, got pgsql garbage collected memory
instead of string expected, got nil
.
I see you fixed pgsql_encryptPassword
in c5254c0d3bb279c327ba6e08e34a5da8e01028dc.
It also needs doing to conn_unescapeBytea
e.g. currently:
This is because in
pgsql_connectdb
you callpgsql_conn_new
before callingluaL_checkstring
.Order should be:
luaL_checkstring
)