libschc
libschc copied to clipboard
Segmentation Fault in function mbuf_sort
When data packets need to be sorted, segment errors will be triggered in function mbuf_sort. I think it should be like this, and it does work.
mbuf_sort(){
...
if ((*next)->frag_cnt < (*curr)->frag_cnt)
{
// swap pointers for curr and curr->next
schc_mbuf_t *temp;
temp = *curr;
*curr = *next;
*next = temp;
temp = (*curr)->next;
(*curr)->next = (*next)->next;
(*next)->next = temp;
curr = &(*curr)->next; swapped = 1;
}
...
}
Could you give more information when this happens?