aboutsummaryrefslogtreecommitdiffstats
path: root/controller/ctl-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'controller/ctl-plugin.c')
-rw-r--r--controller/ctl-plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/controller/ctl-plugin.c b/controller/ctl-plugin.c
index 9e4e419..6c73573 100644
--- a/controller/ctl-plugin.c
+++ b/controller/ctl-plugin.c
@@ -159,10 +159,10 @@ STATIC int PluginLoadOne (CtlPluginT *ctlPlugin, json_object *pluginJ, void* han
int Lua2cAddOne(luaL_Reg *l2cFunc, const char* l2cName, int index) {
char funcName[CONTROL_MAXPATH_LEN];
strncpy(funcName, "lua2c_", sizeof (funcName));
- strncat(funcName, l2cName, sizeof (funcName));
+ strncat(funcName, l2cName, strlen(l2cName));
Lua2cFunctionT l2cFunction = (Lua2cFunctionT) dlsym(dlHandle, funcName);
- if (!l2cFunction) {
+ if (!l2cFunction) {
AFB_ERROR("CTL-PLUGIN-LOADONE symbol'%s' missing err=%s", funcName, dlerror());
return 1;
}