mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
dtinfo: Fix a segmentation fault.
The return value from CanvasRenderer::_dofont is a pointer. It will be passed to the free function. Ensure that pointer always points to a dynamically allocated memory to avoid segmentation faults.
This commit is contained in:
parent
35c35d2b3c
commit
3909c8dbcc
1 changed files with 1 additions and 1 deletions
|
@ -621,7 +621,7 @@ CanvasRenderer::_dofont(const FeatureSet &fs, Symbol** symbols)
|
|||
// if we still can't find one go with whatever.
|
||||
|
||||
else {
|
||||
xlfd = (char*)"-*-*-*-*-*-*-*-*-*-*-*-*-*";
|
||||
xlfd = strdup("-*-*-*-*-*-*-*-*-*-*-*-*-*");
|
||||
}
|
||||
#ifdef FONT_DEBUG
|
||||
fprintf(stderr, "resulting in \"%s\".\n", xlfd);
|
||||
|
|
Loading…
Reference in a new issue