don't use strlen(), in case of random data, there's no \0 at the end...

This commit is contained in:
Martin Errenst 2018-07-28 22:22:16 +02:00
parent c4415a9dba
commit a7bda49cd7

View file

@ -127,7 +127,7 @@ static void telnetTask(void *pvParameters)
if(buffer_pos + data_len < sizeof(input_line)) { if(buffer_pos + data_len < sizeof(input_line)) {
// copy data into input buffer // copy data into input buffer
if(data_len > 0){ 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; buffer_pos += data_len;
// check for line ending // check for line ending
if((data_len >= 2) && if((data_len >= 2) &&