plugin:buffer overflow

(cherry picked from commit 3e3a583d72)
This commit is contained in:
xiang.zhou
2024-11-05 08:43:47 +08:00
committed by vulgraph
parent ec55c6c736
commit fabe12fdc9
+2 -2
View File
@@ -40,7 +40,7 @@ void handle_add_plugin(nng_aio *aio)
header.ctx = aio;
header.type = NEU_REQ_ADD_PLUGIN;
strcpy(cmd.library, req->library);
strncpy(cmd.library, req->library, NEU_PLUGIN_LIBRARY_LEN);
cmd.schema_file = req->schema_file;
cmd.so_file = req->so_file;
ret = neu_plugin_op(plugin, header, &cmd);
@@ -64,7 +64,7 @@ void handle_update_plugin(nng_aio *aio)
header.ctx = aio;
header.type = NEU_REQ_UPDATE_PLUGIN;
strcpy(cmd.library, req->library);
strncpy(cmd.library, req->library, NEU_PLUGIN_LIBRARY_LEN);
cmd.schema_file = req->schema_file;
cmd.so_file = req->so_file;
ret = neu_plugin_op(plugin, header, &cmd);