Open soramame21 opened 6 years ago
That is a good catch! Although now I'm not sure what that line is doing exactly.
I think it should be replaced with
if (strncmp(&response[i], _recv_delimiter, _recv_delim_size) == 0) {
i += _recv_delim_size;
break;
This will need some testing to make sure.
@geky I see. Thanks for reply and the fix.
I read following code and found next line is accessing a negative index. Is it true?
response[i+1-_recv_delim_size]
I assume following conditions. i=0, recv_delim_size=2, recv_delimiter="\r\n"