Opened 19 years ago
Closed 19 years ago
#1399 closed defect (fixed)
Mapscript/cloneMap/Processing
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer C Library | Version: | 4.6 |
Severity: | normal | Keywords: | |
Cc: |
Description
We are using MapScript/Java inside Tomcat. We encountered a crash in webObj.cloneMap() when a PROCESSING-statement was used inside a Layer-Block. My impression is, that there is a bug in mapcopy.c/msCopyLayer (?) I think: After the line MS_COPYSTELEM(numprocessing); and before the loop for (i = 0; i < dst->numprocessing; i++) {...} a memory-allocation for dst->processing is missing. I made a change: MS_COPYSTELEM(numprocessing); //OLD // Allocating an initializing memory for processing-array. // Must be dst->numprocessing+1 to be 0-terminated. dst->processing = numprocessing ? (char*) calloc(dst->numprocessing+1,sizeof(char*)) : 0; for (i = 0; i < dst->numprocessing; i++) { //OLD ... I hope this is helpful. Greetings Benedikt Rothe
Change History (3)
comment:2 by , 19 years ago
Sean's proposal accomplishes the same thing, and somewhat more cleanly. I would suggest it.
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix committed to CVS HEAD (4.7) and branch-4-6 (mapcopy.c revision 1.40.2.1). I've added a processing directive to one of the layers in the mapscript test fixture and verified that the layer can be copied without problems.
Note:
See TracTickets
for help on using tickets.