[mapserver-commits] [MapServer/MapServer] db47dc: mapobject.c: clear cached reprojectors in msRemove...
Kaixuan Li
noreply at github.com
Thu Aug 27 06:02:19 PDT 2026
Branch: refs/heads/backport-7612-to-branch-8-6
Home: https://github.com/MapServer/MapServer
Commit: db47dc3ef59128fe418be5f05be105fe66bbad4b
https://github.com/MapServer/MapServer/commit/db47dc3ef59128fe418be5f05be105fe66bbad4b
Author: MarkLee131 <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)
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