[mapserver-commits] r11552 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Apr 13 11:09:05 EDT 2011


Author: tbonfort
Date: 2011-04-13 08:09:05 -0700 (Wed, 13 Apr 2011)
New Revision: 11552

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapcairo.c
Log:
fix crash on embeded legend with cairo raster renderer

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-04-13 14:39:28 UTC (rev 11551)
+++ trunk/mapserver/HISTORY.TXT	2011-04-13 15:09:05 UTC (rev 11552)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk): 
 ---------------------------- 
 
+- fix crash on embeded legend with cairo raster renderer
+
 - fix crashes in SVG renderer on polygon symbol fills (#3837)
 
 - fix crash/corruptions with raster layers in pdf outputs (#3799)

Modified: trunk/mapserver/mapcairo.c
===================================================================
--- trunk/mapserver/mapcairo.c	2011-04-13 14:39:28 UTC (rev 11551)
+++ trunk/mapserver/mapcairo.c	2011-04-13 15:09:05 UTC (rev 11552)
@@ -721,7 +721,7 @@
     rb->width = cairo_image_surface_get_width(r->surface);
     rb->height = cairo_image_surface_get_height(r->surface);
     pb = (unsigned char*)malloc(rb->height * rb->data.rgba.row_step * sizeof(unsigned char*));
-    memcpy(pb,cairo_image_surface_get_data(r->surface),rb->height * rb->data.rgba.row_step * sizeof(unsigned char*));
+    memcpy(pb,cairo_image_surface_get_data(r->surface),rb->height * rb->data.rgba.row_step);
     rb->data.rgba.pixels = pb;
     rb->data.rgba.r = &(pb[2]);
     rb->data.rgba.g = &(pb[1]);



More information about the mapserver-commits mailing list