Skip to content

Commit ee9da15

Browse files
authored
Merge pull request #2739 from vulgraph/backport/CVE-2024-10964-v2.6
v2.6: bound plugin-library copy (CVE-2024-10964)
2 parents ec00415 + 80caae1 commit ee9da15

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)