Opened 16 years ago

Closed 16 years ago

#2739 closed defect (fixed)

Rendering raster fonts with AGG may cause crash in mapserver

Reported by: tamas Owned by: tamas
Priority: normal Milestone: 5.2.1 release
Component: AGG Version: unspecified
Severity: normal Keywords:
Cc: dmorissette

Description

I've noticed that rendering raster fonts when the character code falls outside of the 23-127 domain may cause crash in mapserver. The following patch provides a fix for the problem, however I consider this as rather a bug in the AGG libraries

Attachments (1)

mapagg.cpp.patch (852 bytes ) - added by tamas 16 years ago.

Download all attachments as: .zip

Change History (6)

by tamas, 16 years ago

Attachment: mapagg.cpp.patch added

comment:1 by dmorissette, 16 years ago

Cc: dmorissette added

The following problem description (from Tamas on mapserver-dev) should be reported to the AGG project if/when there is a new maintainer:

There is a signed char to unsigned int
conversion in the agg renderer code which causes that the negative
character codes are converted to large integer numbers.  Then this
number is blindly used as an index to access the pixel information of
the corresponding character in the array specified in
agg_embedded_raster_fonts.cpp.
See also "render_text' in agg_renderer_raster_text.h line 51 and
'prepare' in agg_glyph_raster_bin.h line 82

I consider this as a deficiency of the agg library itself but I'm not
too keen to prepare fixes for AGG at the moment. (I'm using AGG 2.4
right now)

comment:2 by tamas, 16 years ago

Milestone: 5.4 release
Owner: changed from tbonfort to tamas
Status: newassigned

Applied the modified fix in r7858

comment:3 by tamas, 16 years ago

Committed the fix to branch 5-2 in r7860

comment:4 by tamas, 16 years ago

Milestone: 5.4 release5.2.1 release

comment:5 by tbonfort, 16 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.