Ethereal-dev: Re: [Ethereal-dev] patch for file.c

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 21 Jun 2003 02:01:59 -0700
On Fri, Jun 20, 2003 at 10:38:08AM +0200, Tomas Kukosa wrote:
> Printing can crash if some column (generally info column) is too long
> and buffer doubling is not enough. It is fixed in attached patch.

Should it set the buffer size to "enough to hold the column", or should
it set it to the maximum of "twice the existing size" and "enough to
hold the column", or should it set it to the smallest "existing size *
2^N" that's large enough to hold the column?

The theory behind doubling is that it means you aren't increasing it as
often that way, but that might not be a useful optimization here.

If it's not, is doubling the line length useful as well, or should we
just set "line_buf_len" to "line_len"?