Please sign in to comment.
Fix illegal use of stack-allocated objects in maprendering
pointObj and lineObj defined in the else block in msDrawLabelBounds() are valid only in the "else" block context. Once outside (e.g. in the "return msDrawShadeSymbol()"), the variables should not be considered valid anymore ; it led in some cases in underlying calls to msSmallAlloc() with a negative integer, resulting in a "unable to allocate memory" error. First version of this patch extracted the pointObj / lineObj variables just before the "if" call, the current one was proposed by @gberaudo.
- Loading branch information...