[geos-commits] r2625 - branches/3.1/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Sep 16 19:17:33 EDT 2009


Author: pramsey
Date: 2009-09-16 19:17:31 -0400 (Wed, 16 Sep 2009)
New Revision: 2625

Modified:
   branches/3.1/capi/geos_ts_c.cpp
Log:
Add space for null termination at the end of the geos reason string.


Modified: branches/3.1/capi/geos_ts_c.cpp
===================================================================
--- branches/3.1/capi/geos_ts_c.cpp	2009-09-11 18:47:32 UTC (rev 2624)
+++ branches/3.1/capi/geos_ts_c.cpp	2009-09-16 23:17:31 UTC (rev 2625)
@@ -580,7 +580,7 @@
             std::string errloc = err->getCoordinate().toString();
             const std::size_t msglen = errmsg.length();
             const std::size_t loclen = errloc.length();
-            result = (char*)std::malloc(msglen + loclen + 3);
+            result = (char*)std::malloc(msglen + loclen + 4);
             sprintf(result, "%s [%s]", errmsg.c_str(), errloc.c_str());
         }
         else {



More information about the geos-commits mailing list