[Serdev] xlog color patch
Ingo Wolfsberger
iwolfsberger at gmx.net
Mon Jun 13 16:33:36 UTC 2005
> You might want to increase COL_BUF or move it to allocating memory as
> needed, 20 bytes doesn't seem large enough IMHO as 3 color entities
> (with fore & background colors) in a xlog call would overflow the
> variable (5 + (5*3) + 1 = 21). How does the xlog module with this patch
> react to something like:
>
> xlog("L_ERR",
> "%Csrtesting%Cybtesting%Cwstesting%Cswtesting%Cgrtesting%Crgtesting\n");
>
> It's not likely to come up but you never know...
Hello Evan,
Only one ansi color string is written into the static char color[COL_BUF];
It is possible to use the color specifier more than one time, the additional
static char color[COL_BUF] are created.
Overflow should never happen.
bye,
Ingo
--
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
More information about the Serdev
mailing list