mapserver/mapserver — pull request #4952 by pmauduit (2014-07-03 13:39:16+00:00)
Title: 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.