<br><font size=2 face="sans-serif">Hallo List</font>
<br>
<br><font size=2 face="sans-serif">We are using MapScript/Java inside Tomcat.</font>
<br><font size=2 face="sans-serif">We encountered a crash in webObj.cloneMap()
when </font>
<br><font size=2 face="sans-serif">a PROCESSING-statement was used inside
a Layer-Block.</font>
<br>
<br><font size=3>My impression is, that there is a bug in mapcopy.c/msCopyLayer
(?)</font>
<br>
<br><font size=3>I think: After the line</font>
<br><font size=3> MS_COPYSTELEM(numprocessing);</font>
<br><font size=3>and before the loop</font>
<br><font size=3> for (i = 0; i < dst->numprocessing;
i++) {...}</font>
<br><font size=3>a memory-allocation for dst->processing is missing.</font>
<br>
<br><font size=3>I made a change:</font>
<br><font size=3> MS_COPYSTELEM(numprocessing); //OLD</font>
<br><font size=3> // Allocating an initializing memory for processing-array.</font>
<br><font size=3> // Must be dst->numprocessing+1 to be 0-terminated.</font>
<br><font size=3> dst->processing = numprocessing ? </font>
<br><font size=3>
(char*) calloc(dst->numprocessing+1,sizeof(char*))
: </font>
<br><font size=3>
0;</font>
<br><font size=3> for (i = 0; i < dst->numprocessing; i++)
{ //OLD</font>
<br><font size=3> ...</font>
<br>
<br><font size=3>I hope this is helpful. Greetings</font>
<br><font size=3>Benedikt Rothe</font>