fix segfault bug in slip decoding.