don't use strlen(), in case of random data, there's no \0 at the end...
This commit is contained in:
parent
c4415a9dba
commit
a7bda49cd7
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ static void telnetTask(void *pvParameters)
|
|||
if(buffer_pos + data_len < sizeof(input_line)) {
|
||||
// copy data into input buffer
|
||||
if(data_len > 0){
|
||||
memcpy(&input_line[buffer_pos], (char*)data_in, strlen(data_in));
|
||||
memcpy(&input_line[buffer_pos], (char*)data_in, data_len);
|
||||
buffer_pos += data_len;
|
||||
// check for line ending
|
||||
if((data_len >= 2) &&
|
||||
|
|
Loading…
Reference in a new issue