Hi,
Le vendredi 25 juillet 2008 à 15:23 -0700, Kumar, Hemant a écrit :
> Even if I comment  as shown below and add a simple printf statement it
> fails but if I just keep the first line ep_alloc() and comment
> everything 
> 
> With no printf addition then it works.:--
>                   if (check_col(pinfo->cinfo,COL_INFO))
> 
>                   {
>                       temp_str = ep_alloc(STRING_BUFFER);
> 
>                      printf( "[%s] %s ", message->direction,
> message->message_type);
> 
>          //           g_snprintf( temp_str, sizeof(temp_str), "[%s] %s
> ", message->direction, message->message_type);
> 
>          //          col_add_str(pinfo->cinfo, COL_INFO, temp_str);
> 
>                    
How many time is your function called? Odds are your bug is elsewhere
anyway, some kind of memory corruption, double check your memory
allocations, there's a least one bug in your code above: sizeof(temp_str) is
4 or 8 not STRING_BUFFER, maybe you did the same mistake elsewhere and smashed 
the stack, heap, whatever.

Didier
 
> 

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@wireshark.org
https://wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to