Opened 18 years ago

Last modified 13 years ago

#1888 closed defect

Move allocation of cgiRequestObj paramNames/Values to msAllocCgiObj()? — at Version 2

Reported by: dmorissette Owned by: sdlime
Priority: high Milestone: 6.0 release
Component: MapServer CGI Version: 4.10
Severity: minor Keywords:
Cc:

Description (last modified by dmorissette)

While checking bug 1885, I noticed that msAllocCgiObj() doesn't allocate the
paramNames and paramValues arrays, so we code to alloc those arrays in at least
3 files: mapserv.c, swiginc/owsrequest.i and mapscript/php3/mapscript_i.c:

    request = msAllocCgiObj();

    request->ParamNames = (char **) malloc(MAX_PARAMS*sizeof(char*));
    request->ParamValues = (char **) malloc(MAX_PARAMS*sizeof(char*));


Should we not move the allocation of the ParamNames/Values inside
msAllocCgiObj() so that instead of having the following code in multiple places
we'd have a single call to msAllocCgiObj()?

I was going to suggest we do this for 4.10 in bug 1885, but since
msAllocMapServObj() also calls msAllocCgiObj() but doesn't see to care about the
paramNames/Values arrays we may need to take some time to review the code before
making this change, making this more of a 5.0 change than a bugfix for 4.10.

Change History (2)

comment:1 by dmorissette, 18 years ago

Milestone: 5.0 release
Setting 5.0 target milestone

comment:2 by dmorissette, 17 years ago

Description: modified (diff)
Milestone: 5.0 release5.2 release
Note: See TracTickets for help on using tickets.