[mapserver-commits] [MapServer/MapServer] 9c9d1f: mapproject.c: check msProjectCreateReprojector() r...

Kaixuan Li noreply at github.com
Fri Aug 28 06:21:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/MapServer/MapServer
  Commit: 9c9d1f60c92b9b96c63483e626eb1ebf938abeb4
      https://github.com/MapServer/MapServer/commit/9c9d1f60c92b9b96c63483e626eb1ebf938abeb4
  Author: Kaixuan Li <kaixuan.li at ntu.edu.sg>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    M msautotest/mspython/test_bug_check.py
    M src/mapproject.c

  Log Message:
  -----------
  mapproject.c: check msProjectCreateReprojector() result in msProjectRect() (fixes #7613) (#7615)

The "polar stereographic to another projected system" branch passed the
result of msProjectCreateReprojector() straight to msProjectRectAsPolygon(),
which dereferences reprojector->out on its first line. When a transformation
cannot be built the reprojector is NULL and the process segfaults.

The six other calls to msProjectCreateReprojector() in this file all check
the result; this one was the exception.

The same block also leaked the reprojector when neither rect condition
matched, since it is created inside the for (sign ...) loop but destroyed
only on the two return paths. Destroy it before the next iteration.

Adds a msautotest case that reprojects a rectangle enclosing the pole to a
target no transformation can be built for.



To unsubscribe from these emails, change your notification settings at https://github.com/MapServer/MapServer/settings/notifications


More information about the MapServer-commits mailing list