Opened 19 years ago
Closed 19 years ago
#1125 closed defect (fixed)
msSaveImageGD() - mismatched malloc/free logic
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer C Library | Version: | 4.4 |
Severity: | normal | Keywords: | |
Cc: | sgillies@… |
Description
mapgd.c - revision 1.91. I see that msNewGDFileCtx() (called by msSaveImageGD()) calls malloc() directly while gdFreeFileCtx() (also oddly in mapgd.c) calls gdFree() to free the same piece of memory. When Visual Studio 7 (ie. .NET) is used with bgd.dll this means the allocation is made on the vs7 runtime heap, while the deallocation will take place on the VC6 heap used by bgd.dll resulting in a crash under some circumstances. This needs to be fixed in 4.4. and 4.5.
Note:
See TracTickets
for help on using tickets.