[mapserver-commits] [MapServer/MapServer] fe14be: mapobject.c: clear cached reprojectors in msRemove...
Kaixuan Li
noreply at github.com
Thu Aug 27 06:02:00 PDT 2026
Branch: refs/heads/main
Home: https://github.com/MapServer/MapServer
Commit: fe14be21dc6b8b95f9b9946c7ba5f7fef247c904
https://github.com/MapServer/MapServer/commit/fe14be21dc6b8b95f9b9946c7ba5f7fef247c904
Author: Kaixuan Li <kaixuan.li at ntu.edu.sg>
Date: 2026-08-27 (Thu, 27 Aug 2026)
Changed paths:
M msautotest/mspython/test_bug_check.py
M src/mapobject.c
Log Message:
-----------
mapobject.c: clear cached reprojectors in msRemoveLayer() (fixes #7611) (#7612)
msRemoveLayer() detached a layer without clearing
layer->reprojectorLayerToMap / reprojectorMapToLayer. Those cached
reprojectors hold a raw pointer to the map the layer was removed from,
which has two consequences:
- A layer moved to another map keeps reprojecting to the old map's
projection, so it is drawn in the wrong place or not at all.
- If the old map is freed while the layer lives on, the next
msLayerGetReprojectorToMap() reads reprojector->out->generation_number
from freed memory.
freeLayer() already destroys both cached reprojectors and initLayer()
initialises them to NULL, so this brings msRemoveLayer() in line with the
other two.
Adds a msautotest case that moves a layer between two maps with different
projections and checks that it still renders in the new one.
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