#470 closed defect (fixed)
msCopyMap causes segfault in absence of fontset
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript | Version: | 4.0 |
Severity: | normal | Keywords: | |
Cc: | gsibilio@… |
Description
For a mapObj created from a map file with no fontset definition, the msCopyMap function used in mapObj::clone() segfaults. A work around may be to declare an empty fontset file. This works for me, but I only tested with a MapServer with truetype support enabled. Will check to see if the bug can be avoided when there is no truetype support. The fix shouldn't be too much, just check to see if there is a fontset beforing calling the msCopyFontSet function.
Attachments (1)
Change History (4)
by , 21 years ago
Attachment: | mapserver_patch_bug470.txt added |
---|
comment:1 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This bug is fixed in main CVS and branch-4-0. A patch is also attached and should be applied to the 4.0.1 mapserver release. Two lines in mapcopy.c are replaced by one line. If for some reason a user cannot or does not want to patch and recompile, the bug can be avoided by executing one extra statement in the mapscript application. Before calling the clone() method of a mapObj with no defined fontset, simply set the mapObj's fontset.filename to something other than a NULL value. For example: mapobj = mapObj('nofontset.map') mapobj.fontset.filename = '' clone_mapobj = mapobj.clone() If the map file defines a fontset, mapobj.fontset.filename begins with a non-NULL value and the bug will not occur, so do not bind a new value to the fontset.filename.
comment:2 by , 20 years ago
op_sys: | All → Windows XP |
---|---|
rep_platform: | All → PC |
comment:3 by , 20 years ago
Cc: | added |
---|---|
rep_platform: | PC → All |
Note:
See TracTickets
for help on using tickets.
Patch to mapcopy.c fixing bug 470