[mapserver-commits] [mapserver/mapserver] f7772c: Fix illegal use of stack-allocated objects in mapr...

GitHub noreply at github.com
Fri Jul 4 04:22:00 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/mapserver/mapserver
  Commit: f7772c36c39e28fe4e53d6632aedcc32c542877c
      https://github.com/mapserver/mapserver/commit/f7772c36c39e28fe4e53d6632aedcc32c542877c
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2014-07-03 (Thu, 03 Jul 2014)

  Changed paths:
    M maprendering.c

  Log Message:
  -----------
  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.


  Commit: f8044b6e85cc4baea671b707c85ba3bf852cfa27
      https://github.com/mapserver/mapserver/commit/f8044b6e85cc4baea671b707c85ba3bf852cfa27
  Author: Thomas Bonfort <thomas.bonfort at gmail.com>
  Date:   2014-07-04 (Fri, 04 Jul 2014)

  Changed paths:
    M maprendering.c

  Log Message:
  -----------
  Merge pull request #4952 from pmauduit/fix-illegal-use-stack

Fix illegal use of stack-allocated objects in maprendering


Compare: https://github.com/mapserver/mapserver/compare/0c573e457834...f8044b6e85cc


More information about the mapserver-commits mailing list