Skip to content

Commit 80caae1

Browse files
ZhouBoxvulgraph
authored andcommitted
plugin:buffer overflow
(cherry picked from commit 3e3a583)
1 parent ec00415 commit 80caae1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎plugins/restful/plugin_handle.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void handle_add_plugin(nng_aio *aio)
4040

4141
header.ctx = aio;
4242
header.type = NEU_REQ_ADD_PLUGIN;
43-
strcpy(cmd.library, req->library);
43+
strncpy(cmd.library, req->library, NEU_PLUGIN_LIBRARY_LEN);
4444
ret = neu_plugin_op(plugin, header, &cmd);
4545
if (ret != 0) {
4646
NEU_JSON_RESPONSE_ERROR(NEU_ERR_IS_BUSY, {

0 commit comments

Comments
 (0)