| Description: |
Tk_MeasureChars() and Tk_DrawChars() (in
unix/tkUnixFont.c) are both capable of ending up
reading freed memory (which is a critical failure when
Tcl is built with memory debugging turned on) the
*second* time the subfont table for a font is extended.
The problem is that those two functions keep around a
pointer into the old subfont table over a call to
FindSubFontForChar() which (via its calls to
CanUseAlias()) can reallocate the subfont table. The
first reallocation is harmless enough, because we start
out with a subfont table that is allocated as part of
the overall font structure, but the second leaves us
dangling off into nowhere...
|