Quote:
Originally Posted by
ramen_noodle
Code please.
helo my code is given below
static HeadderFun* listheader_ntoh(HeadderFun* lh)
{
lh->head_len = ntohl(lh->cl_head_len);
lh->record_len = ntohl(lh->cl_record_len);
lh->linecnt = ntohl(lh->cl_linecnt);
return lh;
}
now when i use ntohl() in the above code, i got segmentation fault.
when i remove it, application work fine.
can u tell me whats root cause of segmentation fault .
amit