Module Name: src
Committed By: agc
Date: Sun Oct 18 07:14:19 UTC 2009
Modified Files:
src/crypto/external/bsd/netpgp/dist/bindings/lua: glue.c
Log Message:
Minor renaming of lua array
Zero allocated storage after return from lua_newuserdata()
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c
diff -u src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c:1.1 src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c:1.2
--- src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c:1.1 Mon Oct 12 02:55:46 2009
+++ src/crypto/external/bsd/netpgp/dist/bindings/lua/glue.c Sun Oct 18 07:14:19 2009
@@ -104,6 +104,7 @@
netpgp_t *netpgp;
netpgp = lua_newuserdata(L, sizeof(*netpgp));
+ (void) memset(netpgp, 0x0, sizeof(*netpgp));
set_homedir(netpgp, getenv("HOME"), "/.gnupg", 1);
netpgp_setvar(netpgp, "hash", DEFAULT_HASH_ALG);
return 1;
@@ -332,7 +333,7 @@
return 1;
}
-const struct luaL_reg libnetpgp[] = {
+const struct luaL_reg libluanetpgp[] = {
{ "new", l_new },
{ "init", l_init },
@@ -356,6 +357,6 @@
int
luaopen_netpgp(lua_State *L)
{
- luaL_openlib(L, "netpgp", libnetpgp, 0);
+ luaL_openlib(L, "netpgp", libluanetpgp, 0);
return 1;
}