There are more than one right solution. I chose one:
line_buf_len = 2 * line_len;
Another can be:
line_buf_len = line_len;
or
line_buf_len = line_len + 256;
We could discuss what is the best but I think it would be useless (as
definite right solution can not be decided in this case).
Please, choose one what you prefer.
We can keep our thews for another discussion, e.g. about Q.931 patch
which I sent last week too :-).
Regards,
Tom
Guy Harris wrote:
>
> 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"?
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev