Opened 18 years ago

Closed 13 years ago

#1888 closed defect (fixed)

Move allocation of cgiRequestObj paramNames/Values to msAllocCgiObj()?

Reported by: dmorissette Owned by: aboudreault
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 (7)

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

comment:3 by sdlime, 16 years ago

Status: newassigned

comment:4 by sdlime, 16 years ago

Milestone: 5.2 release5.4 release
Severity: normalminor

Moving to 5.4. This is a good idea, but slips again as it isn't blocking anything.

Steve

comment:5 by dmorissette, 13 years ago

Owner: changed from sdlime to aboudreault
Status: assignednew

Moving to 6.0. Assigned to Alan.

comment:6 by dmorissette, 13 years ago

Milestone: 5.6 release6.0 release

comment:7 by aboudreault, 13 years ago

Resolution: fixed
Status: newclosed

Fixed and committed in r11452.

Note: See TracTickets for help on using tickets.