[mapserver-commits] [MapServer/MapServer] fb61d7: [Backport branch-8-4] Fix(parser): Prevent crash w...
github-actions[bot]
noreply at github.com
Mon Sep 29 13:12:25 PDT 2025
Branch: refs/heads/branch-8-4
Home: https://github.com/MapServer/MapServer
Commit: fb61d7d4686c9ea785cc9698d52d1718d8461590
https://github.com/MapServer/MapServer/commit/fb61d7d4686c9ea785cc9698d52d1718d8461590
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date: 2025-09-29 (Mon, 29 Sep 2025)
Changed paths:
M msautotest/query/context.map
A msautotest/query/expected/context_test004.png
A msautotest/query/expected/context_test005.png
M src/maputil.c
Log Message:
-----------
[Backport branch-8-4] Fix(parser): Prevent crash with non-existent layer in REQUIRES (#7355)
* Fix(parser): Prevent crash with non-existent layer in REQUIRES
When a REQUIRES or LABELREQUIRES expression contains a reference to
a layer that does not exist in the mapfile, the expression parser would
treat it as an attribute binding. Since msEvalContext is called without
a shape object, this would lead to a NULL pointer dereference and a
crash when the parser tried to evaluate the binding.
This patch adds a check after tokenizing the expression to ensure no
attribute binding tokens are present. If any are found, it indicates
a reference to a non-existent layer. An error is reported and the
evaluation returns MS_FALSE, preventing the crash.
Fix generated by gemini-2.5-pro
* Add tests with non existant REQUIRES parameter triggering a failure
---------
Co-authored-by: Māris Nartišs <maris.gis at gmail.com>
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