[mapserver-commits] r10185 - trunk/mapserver/mapscript/php

svn at osgeo.org svn at osgeo.org
Thu May 27 14:47:38 EDT 2010


Author: aboudreault
Date: 2010-05-27 14:47:37 -0400 (Thu, 27 May 2010)
New Revision: 10185

Modified:
   trunk/mapserver/mapscript/php/layer.c
   trunk/mapserver/mapscript/php/shape.c
Log:
Fixed 2 memory access problems in php/mapscript

Modified: trunk/mapserver/mapscript/php/layer.c
===================================================================
--- trunk/mapserver/mapscript/php/layer.c	2010-05-27 18:41:10 UTC (rev 10184)
+++ trunk/mapserver/mapscript/php/layer.c	2010-05-27 18:47:37 UTC (rev 10185)
@@ -1875,7 +1875,7 @@
 
     PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l",
-                              &shapeindex, tileindex) == FAILURE) {
+                              &shapeindex, &tileindex) == FAILURE) {
         PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
         return;
     }

Modified: trunk/mapserver/mapscript/php/shape.c
===================================================================
--- trunk/mapserver/mapscript/php/shape.c	2010-05-27 18:41:10 UTC (rev 10184)
+++ trunk/mapserver/mapscript/php/shape.c	2010-05-27 18:47:37 UTC (rev 10185)
@@ -1222,7 +1222,7 @@
         {
             for(i=0; i<php_shape->shape->numvalues; i++)
             {
-                add_assoc_string(php_shape->values, php_layer->layer->items[i], php_shape->shape->values[i], 0);
+                add_assoc_string(php_shape->values, php_layer->layer->items[i], php_shape->shape->values[i], 1);
             }
         }
         else



More information about the mapserver-commits mailing list