Fix possible bufferoverflow with strncpy
This commit is contained in:
parent
fcbd1ae05e
commit
55b664b58f
@ -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, " ");
|
||||
|
Loading…
Reference in New Issue
Block a user