mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
ENH: 3mf: improve some logic
1. skip file including /../ 2. use snprintf instead of sprintf JIRA: jira-xxxx Change-Id: I6695dc11f9f4af4318038e6db5c219fd14e73aef
This commit is contained in:
parent
9d12c73aee
commit
805248f38a
2 changed files with 23 additions and 13 deletions
|
@ -219,7 +219,7 @@ typedef struct _cli_callback_mgr {
|
|||
//notify_message = "Plate "+ std::to_string(m_plate_index) + "/" +std::to_string(m_plate_count)+ ": Percent " + std::to_string(m_progress) + ": "+m_message;
|
||||
|
||||
char pipe_message[PIPE_BUFFER_SIZE] = {0};
|
||||
sprintf(pipe_message, "%s\n", notify_message.c_str());
|
||||
snprintf(pipe_message, PIPE_BUFFER_SIZE, "%s\n", notify_message.c_str());
|
||||
|
||||
int ret = write(m_pipe_fd, pipe_message, strlen(pipe_message));
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": write returns "<<ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue