Skip to content

Commit

Permalink
Merge pull request #2286 from ZhouBox/main
Browse files Browse the repository at this point in the history
plugin:buffer overflow
  • Loading branch information
fengzeroz authored Nov 5, 2024
2 parents 0b6c5be + 3e3a583 commit 4de5e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/restful/plugin_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void handle_add_plugin(nng_aio *aio)
header.ctx = aio;
header.type = NEU_REQ_ADD_PLUGIN;
header.otel_trace_type = NEU_OTEL_TRACE_TYPE_REST_COMM;
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);
Expand All @@ -66,7 +66,7 @@ void handle_update_plugin(nng_aio *aio)
header.ctx = aio;
header.type = NEU_REQ_UPDATE_PLUGIN;
header.otel_trace_type = NEU_OTEL_TRACE_TYPE_REST_COMM;
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);
Expand Down

0 comments on commit 4de5e0a

Please sign in to comment.