On Tue, May 24, 2011 at 02:50:35PM -0400, eymanm wrote:
>     col_add_fstr(pinfo->cinfo, COL_INFO, "Source: %s", pinfo->srcport);
> 
> When I run, it puts "[Dissector bug, protocol XXX: STATUS_ACCESS_VIOLATION:
> dissector accessed and invalid memory address]" in the Info column.
> 
> What am I doing wrong?

pinfo->srcport is number so you MUST not use %s (which is for string)
Use %u instead, i.e:
>     col_add_fstr(pinfo->cinfo, COL_INFO, "Source: %u", pinfo->srcport);

You can read more about formating string on man 3 printf, html version:
http://linux.die.net/man/3/printf

Cheers.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to