Open cbucher opened 1 year ago
Hi,
the sprintf function is used in several places including here in raft_server.cxx :
sprintf
sprintf( temp_buf, "peer %d: DC ID %d, %s, %s, %d\n", (int)cur_srv->get_id(), (int)cur_srv->get_dc_id(), cur_srv->get_endpoint().c_str(), cur_srv->is_learner() ? "learner" : "voting member", cur_srv->get_priority() );
The echo_server in the examples folder provide a vulnerable code:
Regards
Yes, need to replace sprintf with snprintf, or just get rid of it and use stringstream instead.
snprintf
stringstream
https://github.com/eBay/NuRaft/pull/409
Hi,
the
sprintf
function is used in several places including here in raft_server.cxx :The echo_server in the examples folder provide a vulnerable code:
Regards