Ethereal-dev: Re: [Ethereal-dev] Core Dump

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Fri, 17 Dec 2004 19:49:33 -0800 (PST)
S. Faizi said:
> Can any one offer help with this problem?
>
> Offending line:
>
> col_add_fstr(pinfo->cinfo, COL_INFO, "DATA: %s - Cause: %04x",
> scap_messages[i].scap_title, release_cause);

If the line before the offending line isn't

    if (check_col(pinfo->cinfo, COL_INFO))

then that's the problem; you should never call any of the "col_add"
routines unless "check_col()" on the column returns a non-zero value. 
(The intent is to avoid not only filling in a column if a particular
dissection isn't generating the column data, the intent is to avoid all
code that's only required to generate the column, which means doing the
test in the dissector.  Perhaps it should do the check internally, though,
so that in the simple case the developer doesn't have to.)