diff --git a/stm-firmware/shell.c b/stm-firmware/shell.c index 4da429d..a34f0b7 100644 --- a/stm-firmware/shell.c +++ b/stm-firmware/shell.c @@ -93,7 +93,8 @@ static shellmatta_retCode_t shell_cmd_digio_set(const shellmatta_handle_t hand char buff[64]; char *curr_token; - strncpy(buff, arguments, sizeof(buff)); + strncpy(buff, arguments, sizeof(buff)-1); + buff[63] = '\0'; curr_token = strtok(buff, " "); curr_token = strtok(NULL, " ");