[mapserver-commits] r8892 - branches/branch-5-2/mapserver

svn at osgeo.org svn at osgeo.org
Wed Apr 8 15:40:55 EDT 2009


Author: dmorissette
Date: 2009-04-08 15:40:55 -0400 (Wed, 08 Apr 2009)
New Revision: 8892

Modified:
   branches/branch-5-2/mapserver/HISTORY.TXT
   branches/branch-5-2/mapserver/maplabel.c
   branches/branch-5-2/mapserver/mapprimitive.c
Log:
Fixed seg fault if font not found with label ANGLE FOLLOW (#2973)

Modified: branches/branch-5-2/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-2/mapserver/HISTORY.TXT	2009-04-08 14:35:52 UTC (rev 8891)
+++ branches/branch-5-2/mapserver/HISTORY.TXT	2009-04-08 19:40:55 UTC (rev 8892)
@@ -9,7 +9,11 @@
 
 For a complete change history, please see the Subversion log comments.
 
+Current Version:
+----------------
 
+- Fixed seg fault if font not found with label ANGLE FOLLOW (#2973)
+
 Version 5.2.2 (2009-03-26):
 ---------------------------
 

Modified: branches/branch-5-2/mapserver/maplabel.c
===================================================================
--- branches/branch-5-2/mapserver/maplabel.c	2009-04-08 14:35:52 UTC (rev 8891)
+++ branches/branch-5-2/mapserver/maplabel.c	2009-04-08 19:40:55 UTC (rev 8892)
@@ -540,7 +540,7 @@
       label->offsetx += MS_NINT(bbox[0] / 2);
     }
 
-    return MS_SUCCESS;
+    return 0;
 #else
     msSetError(MS_TTFERR, "TrueType font support is not available or is not current enough (requires 2.0.29 or higher).", "msGetLabelSizeEx()");
     return(-1);

Modified: branches/branch-5-2/mapserver/mapprimitive.c
===================================================================
--- branches/branch-5-2/mapserver/mapprimitive.c	2009-04-08 14:35:52 UTC (rev 8891)
+++ branches/branch-5-2/mapserver/mapprimitive.c	2009-04-08 19:40:55 UTC (rev 8892)
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id:$
+ * $Id$
  *
  * Project:  MapServer
  * Purpose:  Implementations for rectObj, pointObj, lineObj, shapeObj, etc.
@@ -1285,7 +1285,7 @@
     goto FAILURE;
   
   /* determine the total length of the text */
-  if (msGetLabelSizeEx(string, label, &bbox, fontset, scalefactor, MS_FALSE, &offsets) == MS_FAILURE) {
+  if (msGetLabelSizeEx(string, label, &bbox, fontset, scalefactor, MS_FALSE, &offsets) == -1) {
     *status = MS_FAILURE;
     goto FAILURE;
   }



More information about the mapserver-commits mailing list