Ticket #2739 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

mapagg.cpp.patch Download (0.8 KB) - added by tamas 5 years ago.

Change History

Changed 5 years ago by tamas

Changed 5 years ago by dmorissette

  • 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)

Changed 5 years ago by tamas

  • owner changed from tbonfort to tamas
  • status changed from new to assigned
  • milestone set to 5.4 release

Applied the modified fix in r7858

Changed 5 years ago by tamas

Committed the fix to branch 5-2 in r7860

Changed 5 years ago by tamas

  • milestone changed from 5.4 release to 5.2.1 release

Changed 5 years ago by tbonfort

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.