RPL Native Border Router: fix SLIP bug that may occur whenever there is more bytes left in tx buffer than what we just sent

This commit is contained in:
Simon Duquennoy 2018-05-14 13:45:37 -07:00
parent 07ddf50267
commit 92018b0df0
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ slip_flushbuf(int fd)
if(slip_begin == slip_packet_end) {
slip_packet_count--;
if(slip_end > slip_packet_end) {
memcpy(slip_buf, slip_buf + slip_packet_end,
memmove(slip_buf, slip_buf + slip_packet_end,
slip_end - slip_packet_end);
}
slip_end -= slip_packet_end;