⚡️ Use strlcpy with buffer size (#26513)
This commit is contained in:
parent
6c04cf40f4
commit
dfec58e5dc
14 changed files with 51 additions and 61 deletions
|
|
@ -134,7 +134,7 @@ public:
|
|||
* Aborts the current SRAM queue so only use for one or two commands.
|
||||
*/
|
||||
static void inject(const char * const gcode) {
|
||||
strncpy(injected_commands, gcode, sizeof(injected_commands) - 1);
|
||||
strlcpy(injected_commands, gcode, sizeof(injected_commands));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue